Skip to content

Commit

Permalink
Moved CMAKE_EXPORT_COMPILE_COMMANDS
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidPoliakoff authored and white238 committed Dec 12, 2018
1 parent f96528b commit abdbbd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions SetupBLT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ if (NOT BLT_LOADED)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()


################################
# Enable cmake compilation database feature
################################
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

################################
# Macros
################################
Expand Down
5 changes: 3 additions & 2 deletions cmake/SetupCodeChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ endmacro(blt_add_code_checks)
## WORKING_DIRECTORY is the directory that clang_query will be ran. It defaults to the directory
## where this macro is called.
##
## DIE_ON_MATCH This will make a match cause the build to fail, useful if you're using this in
## CI to enforce rules about your code
##
## CHECKERS are the static analysis passes to specifically run on the target. Options
## (no value) : run all available static analysis checks found
## (checker1:checker2) : run checker1 and checker2
Expand All @@ -253,8 +256,6 @@ endmacro(blt_add_code_checks)
macro(blt_add_clang_query_target)
if(CLANGQUERY_FOUND)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## parse the arguments to the macro
set(options)
set(singleValueArgs NAME COMMENT WORKING_DIRECTORY DIE_ON_MATCH)
Expand Down

0 comments on commit abdbbd5

Please sign in to comment.