File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,13 @@ bazel(info output_base OUTPUT_VARIABLE BAZEL_OUTPUT_BASE)
1515string (REPLACE "-" "_" BAZEL_EXEC_ROOT ${PROJECT_NAME} )
1616set (BAZEL_EXEC_ROOT ${BAZEL_OUTPUT_BASE} /execroot/${BAZEL_EXEC_ROOT} )
1717
18- bazel(query "kind(generate_cmake, //...)" OUTPUT_VARIABLE BAZEL_GENERATE_CMAKE_TARGETS)
19- string (REPLACE "\n " ";" BAZEL_GENERATE_CMAKE_TARGETS "${BAZEL_GENERATE_CMAKE_TARGETS} " )
20- bazel(build ${BAZEL_GENERATE_CMAKE_TARGETS} )
21-
22- string (REPLACE "//" "" BAZEL_GENERATE_CMAKE_TARGETS "${BAZEL_GENERATE_CMAKE_TARGETS} " )
23- string (REPLACE ":" "/" BAZEL_GENERATE_CMAKE_TARGETS "${BAZEL_GENERATE_CMAKE_TARGETS} " )
24-
25- foreach (target ${BAZEL_GENERATE_CMAKE_TARGETS} )
26- include (${BAZEL_WORKSPACE} /bazel-bin/${target} .cmake)
27- endforeach ()
18+ macro (include_generated BAZEL_TARGET)
19+ bazel(build ${BAZEL_TARGET} )
20+ string (REPLACE "@" "/external/" BAZEL_TARGET_PATH ${BAZEL_TARGET} )
21+ string (REPLACE "//" "/" BAZEL_TARGET_PATH ${BAZEL_TARGET_PATH} )
22+ string (REPLACE ":" "/" BAZEL_TARGET_PATH ${BAZEL_TARGET_PATH} )
23+ include (${BAZEL_WORKSPACE} /bazel-bin${BAZEL_TARGET_PATH} .cmake)
24+ endmacro ()
2825
2926if (CREATE_COMPILATION_DATABASE_LINK)
3027 file (CREATE_LINK ${PROJECT_BINARY_DIR} /compile_commands.json ${PROJECT_SOURCE_DIR} /compile_commands.json SYMBOLIC )
Original file line number Diff line number Diff line change @@ -12,3 +12,5 @@ set(CMAKE_CXX_COMPILER clang++)
1212project (codeql)
1313
1414include (../misc/bazel/cmake/setup.cmake)
15+
16+ include_generated(//swift/extractor:cmake)
You can’t perform that action at this time.
0 commit comments