Skip to content

Commit

Permalink
Generate a compile_commands.json by default with cmake (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatum authored Aug 16, 2023
1 parent 47024ec commit 62770bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ project(bergamot_translator CXX C)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Generate a compile_commands.json in the build directory. The compile commands allow
# code editors to understand the build process and provide static analysis of the code.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Note that with CMake MSVC build, the option CMAKE_BUILD_TYPE is automatically derived from the key
# 'configurationType' in CMakeSettings.json configurations
if(NOT CMAKE_BUILD_TYPE)
Expand Down

0 comments on commit 62770bb

Please sign in to comment.