From: Jonathan McDowell Date: Fri, 31 Oct 2025 14:32:28 +0000 (+0000) Subject: CMake: Configure to export compilation commands X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=8fa7fc4f9494e30508152e14f657ffd0413ffe36;p=onak.git CMake: Configure to export compilation commands Create a compile_commands.json file listing the compilation commands, allowing for LSP tools like ccls to correctly navigate their way around the code. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b978031..d266db5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,9 @@ option(KEYD "Enable the key daemon to handle communication with the key database" ON) +# Export our compile commands to help LSPs +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) TEST_BIG_ENDIAN(WORDS_BIGENDIAN)