8000 tools are now looking into the build to find the file (#7128) · HighAvailabilityLab/arangodb@4423125 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4423125

Browse files
ObiWahnjsteemann
authored andcommitted
tools are now looking into the build to find the file (arangodb#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.
1 parent f1bf5cc commit 4423125

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

CMakeLists.txt

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
4141
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "deployment target for MacOSX; adjust to your sysem")
4242
endif ()
4343

44-
# required for clang completion in editors
45-
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
46-
4744
# where to find CMAKE modules
4845
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
4946

@@ -263,6 +260,9 @@ else ()
263260
project(arangodb3 LANGUAGES CXX C ASM VERSION ${ARANGODB_VERSION_MAJOR}.${ARANGODB_VERSION_MINOR})
264261
endif ()
265262

263+
# required for clang completion in editors - must be set after creating project
264+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
265+
266266
# Static executables:
267267
option(STATIC_EXECUTABLES "produce static executables" OFF)
268268
if (STATIC_EXECUTABLES)
@@ -1272,21 +1272,6 @@ if (NOT USE_PRECOMPILED_V8)
12721272
endif()
12731273
endif ()
12741274

1275-
# This copies the compile commands to the source dir.
1276-
# There they can be used to repeat parts of compile
1277-
# steps generating an AST. This AST can in turn be used
1278-
# for meaningful auto-completion in editors without
1279-
# heuristics, dice rolling and other guessing.
1280-
1281-
if( EXISTS "${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json" )
1282-
message(STATUS "copy compile_commands.json")
1283-
1284-
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
1285-
${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json
1286-
${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json
1287-
)
1288-
endif()
1289-
12901275
add_custom_target(packages
12911276
DEPENDS ${PACKAGES_LIST}
12921277
)

0 commit comments

Comments
 (0)
0