11 lines
375 B
CMake
11 lines
375 B
CMake
|
|
# Copy compile_commands.json to source directory
|
||
|
|
if (CMAKE_EXPORT_COMPILE_COMMANDS)
|
||
|
|
add_custom_target(
|
||
|
|
CopyCompileCommands ALL
|
||
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||
|
|
${CMAKE_BINARY_DIR}/compile_commands.json
|
||
|
|
${CMAKE_SOURCE_DIR}/compile_commands.json
|
||
|
|
COMMENT "Copying compile_commands.json to source directory"
|
||
|
|
)
|
||
|
|
endif()
|