From a200c44797b7e23f2502397d29fbdf85c9e67bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20KUBLER?= <gregoire.kubler@proton.me> Date: Wed, 9 Oct 2024 17:42:45 +0200 Subject: [PATCH] chore : added automatic CMAKE_EXPORT_COMPILE_COMMANDS as a helper for LSP users --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3574e25c..e9e191c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,9 @@ execute_process( message(STATUS "Latest git commit: ${GIT_COMMIT_HASH}") add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}") +# helper for LSP users +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # Note : project name is ${CMAKE_PROJECT_NAME} and python module name is also ${CMAKE_PROJECT_NAME} set(module_name _${CMAKE_PROJECT_NAME}) # target name set(pybind_module_name ${CMAKE_PROJECT_NAME}) # name of submodule for python bindings -- GitLab