1
0
Fork 0

enable: compile_commands.json

This commit is contained in:
Jan Christoph Uhde 2016-07-26 20:56:25 +02:00
parent 1a31731ab8
commit 1b35ae4f79
2 changed files with 13 additions and 2 deletions

4
.gitignore vendored
View File

@ -1,8 +1,6 @@
tags
build
core.*
build.sh
*.vim
.deps
.dirstamp
@ -27,10 +25,12 @@ build.sh
*.lnk
Thumbs.db
compile_commands.json
testresult.json
botschaft.txt
testsStarted
build.sh
build*/
Build64/
Build32/

View File

@ -34,6 +34,8 @@ else ()
project(ArangoDB CXX C ASM)
endif ()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# where to find CMAKE modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
@ -845,3 +847,12 @@ if (NOT USE_PRECOMPILED_V8)
add_dependencies(arangorestore v8_build)
add_dependencies(arangosh v8_build)
endif ()
#copy compile commands to source dir
if( EXISTS "${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json" )
message(STATUS "copy compile_commands.json")
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json
${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json
)
endif()