1
0
Fork 0

tools are now looking into the build to find the file (#7128)

* tools are now looking into the build to find the file

The file does not need to be copied anymore. In fact it
tends to confuse tools. This is especially true for
different build types, that use different flags,
using the same source directory.
This commit is contained in:
Jan Christoph Uhde 2018-12-18 10:40:31 +01:00 committed by Jan
parent f1bf5cc9cf
commit 4423125a7f
1 changed files with 3 additions and 18 deletions

View File

@ -41,9 +41,6 @@ if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "deployment target for MacOSX; adjust to your sysem") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "deployment target for MacOSX; adjust to your sysem")
endif () endif ()
# required for clang completion in editors
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# where to find CMAKE modules # where to find CMAKE modules
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
@ -263,6 +260,9 @@ else ()
project(arangodb3 LANGUAGES CXX C ASM VERSION ${ARANGODB_VERSION_MAJOR}.${ARANGODB_VERSION_MINOR}) project(arangodb3 LANGUAGES CXX C ASM VERSION ${ARANGODB_VERSION_MAJOR}.${ARANGODB_VERSION_MINOR})
endif () endif ()
# required for clang completion in editors - must be set after creating project
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Static executables: # Static executables:
option(STATIC_EXECUTABLES "produce static executables" OFF) option(STATIC_EXECUTABLES "produce static executables" OFF)
if (STATIC_EXECUTABLES) if (STATIC_EXECUTABLES)
@ -1272,21 +1272,6 @@ if (NOT USE_PRECOMPILED_V8)
endif() endif()
endif () endif ()
# This copies the compile commands to the source dir.
# There they can be used to repeat parts of compile
# steps generating an AST. This AST can in turn be used
# for meaningful auto-completion in editors without
# heuristics, dice rolling and other guessing.
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()
add_custom_target(packages add_custom_target(packages
DEPENDS ${PACKAGES_LIST} DEPENDS ${PACKAGES_LIST}
) )