From 95470160d81b4be3ea327de24e0f614ddf9595f8 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Thu, 6 Mar 2025 07:14:51 +0100 Subject: [PATCH] Set CMAKE_EXPORT_COMPILE_COMMANDS too --- cmake/tools.cmake | 2 ++ test/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/tools.cmake b/cmake/tools.cmake index e884c36..31922d4 100644 --- a/cmake/tools.cmake +++ b/cmake/tools.cmake @@ -6,6 +6,8 @@ if(NOT PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) return() endif() +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake) # enables sanitizers support using the the `USE_SANITIZER` flag available values are: Address, diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index eaa807b..353ecfd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -59,7 +59,7 @@ if(EXISTS ${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) doctest_discover_tests(${PROJECT_NAME}) else() add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME}) -endif +endif() # ---- code coverage ----