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 ()
2
7
3
8
macro (bazel )
4
9
execute_process (COMMAND bazel ${ARGN} COMMAND_ERROR_IS_FATAL ANY OUTPUT_STRIP_TRAILING_WHITESPACE )
@@ -20,6 +25,6 @@ foreach (target ${BAZEL_GENERATE_CMAKE_TARGETS})
20
25
include (${BAZEL_WORKSPACE} /bazel-bin/${target}.cmake )
21
26
endforeach ()
22
27
23
- if (CMAKE_EXPORT_COMPILE_COMMANDS )
28
+ if (CREATE_COMPILATION_DATABASE_LINK )
24
29
file (CREATE_LINK ${PROJECT_BINARY_DIR} /compile_commands.json ${PROJECT_SOURCE_DIR} /compile_commands.json SYMBOLIC )
25
30
endif ()
You can’t perform that action at this time.
0 commit comments