Skip to content

Commit

Permalink
Enable CMAKE_EXPORT_COMPILE_COMMANDS
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed Jul 19, 2024
1 parent f7df7e7 commit 7534a3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ docs/latex/*
cmake-build*/
.idea/*
.cache
compile_commands.json

# PODIO generated artifacts
src/examples/PodioExample/datamodel/*
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE )
set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" )
set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )

# Generate a compilation database, e.g. for IDE autocompletion
set( CMAKE_EXPORT_COMPILE_COMMANDS TRUE )

# Useful for debugging. Copied from:
# https://stackoverflow.com/questions/9298278/cmake-print-out-all-accessible-variables-in-a-script
Expand Down

0 comments on commit 7534a3c

Please sign in to comment.