]> the.earth.li Git - onak.git/commitdiff
CMake: Configure to export compilation commands
authorJonathan McDowell <noodles@earth.li>
Fri, 31 Oct 2025 14:32:28 +0000 (14:32 +0000)
committerJonathan McDowell <noodles@earth.li>
Fri, 31 Oct 2025 14:32:28 +0000 (14:32 +0000)
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

index b978031e64fb5c3c26ef363abd70ee45f4e10da7..d266db51f50dca8716628d85e644411763f3b2d1 100644 (file)
@@ -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)