From 8fa7fc4f9494e30508152e14f657ffd0413ffe36 Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Fri, 31 Oct 2025 14:32:28 +0000 Subject: [PATCH] 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. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.39.5