CMakeLists.txt: enable CMAKE_EXPORT_COMPILE_COMMANDS by default
authorYegor Yefremov <yegorslists@googlemail.com>
Wed, 2 Apr 2025 08:12:35 +0000 (10:12 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 4 Apr 2025 16:01:01 +0000 (18:01 +0200)
This creates a compile_commands.json file that can then be used
by the clangd tool.

CMakeLists.txt

index 90a1b6d..c5dbc74 100644 (file)
@@ -24,6 +24,8 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
 endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
 set(CMAKE_COLOR_MAKEFILE ON)
 
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
 add_definitions(-Wall)
 
 include(CMakeOptions.txt)