From c20781f9700d0560120d7bc1d926ca309eddba56 Mon Sep 17 00:00:00 2001 From: MoAlyousef Date: Wed, 9 Sep 2020 23:52:25 +0300 Subject: [PATCH] formatting --- CMakeLists.txt | 4 ++-- src/gen.cpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb7f206..c2d704c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.0) -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - project(cmkr VERSION 0.1.0) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + set(CMKRLIB_SOURCES "src/args.cpp" "src/gen.cpp" diff --git a/src/gen.cpp b/src/gen.cpp index 2b8fead..2d1d744 100644 --- a/src/gen.cpp +++ b/src/gen.cpp @@ -80,8 +80,7 @@ void generate_cmake(const char *path) { if (toml.contains("cmake")) { const auto &cmake = toml::find(toml, "cmake"); const std::string cmake_min = toml::find(cmake, "minimum_required").as_string(); - ss << "cmake_minimum_required(VERSION " << cmake_min << ")\n\n" - << "set(CMAKE_EXPORT_COMPILE_COMMANDS ON)\n\n"; + ss << "cmake_minimum_required(VERSION " << cmake_min << ")\n\n"; if (cmake.contains("cpp_flags")) { ss << "set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}"; @@ -141,7 +140,7 @@ void generate_cmake(const char *path) { } } - ss << "\n"; + ss << "\nset(CMAKE_EXPORT_COMPILE_COMMANDS ON)\n\n"; if (toml.contains("bin")) { const auto &bins = toml::find(toml, "bin").as_array();