File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1- option (BUILD_SHARED_LIBS "" 0)
1+ option (BUILD_SHARED_LIBS "Build and use shared libraries" 0)
2+ option (CREATE_COMPILATION_DATABASE_LINK "Create compilation database link. Implies CMAKE_EXPORT_COMPILE_COMMANDS" 1)
3+
4+ if (CREATE_COMPILATION_DATABASE_LINK)
5+ set (CMAKE_EXPORT_COMPILE_COMMANDS 1)
6+ endif ()
27
38macro (bazel)
49 execute_process (COMMAND bazel ${ARGN} COMMAND_ERROR_IS_FATAL ANY OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -20,6 +25,6 @@ foreach (target ${BAZEL_GENERATE_CMAKE_TARGETS})
2025 include (${BAZEL_WORKSPACE} /bazel-bin/${target} .cmake)
2126endforeach ()
2227
23- if (CMAKE_EXPORT_COMPILE_COMMANDS )
28+ if (CREATE_COMPILATION_DATABASE_LINK )
2429 file (CREATE_LINK ${PROJECT_BINARY_DIR} /compile_commands.json ${PROJECT_SOURCE_DIR} /compile_commands.json SYMBOLIC )
2530endif ()
You can’t perform that action at this time.
0 commit comments