Create compile_commands.json when building

This commit is contained in:
Aaron Gorodetzky
2020-07-22 05:07:31 -04:00
parent 0a7ca43f31
commit 02be5d4fab
2 changed files with 5 additions and 2 deletions

3
.gitignore vendored
View File

@@ -4,4 +4,5 @@ build/
bin/
*.o
*.exe
*.so
*.so
compile_commands.json

View File

@@ -5,6 +5,9 @@ set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Export compile commands by default.
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# Note that testing requires libcheck to be installed on the system!
# See the tests/CMakeLists.txt file for details.
if(NOT DEFINED BUILD_TESTS)
@@ -53,4 +56,3 @@ if(${BUILD_TESTS})
endif(${BUILD_TESTS})
enable_testing()
add_test(NAME check COMMAND check)