File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change
1
+ This directory contains a Bazel to CMake generator intended mainly for IDE integration.
2
+
3
+ [ ` cmake.bzl ` ] ( ./cmake.bzl ) contains the Bazel side, with the ` cmake_aspect ` rule gathering the necessary information
4
+ from ` cc_* ` rules and ` generate_cmake ` translating that information into CMake commands. ` generate_cmake ` targets also
5
+ depend on all files that are either generated or fetched from external repositories, so that Bazel will fill in those
6
+ dependencies before letting CMake do the C/C++ compilation.
7
+
8
+ [ ` setup.cmake ` ] ( ./setup.cmake ) contains the generic CMake setup, setting up some Bazel related global variables and
9
+ providing an ` include_generated ` macro to be used in ` CMakeLists.txt ` to include a specific ` generate_cmake ` Bazel
10
+ target.
11
+
12
+ See Swift's [ ` CMakeLists.txt ` ] ( ../../../swift/CMakeLists.txt ) file for an example usage.
Original file line number Diff line number Diff line change @@ -6,7 +6,10 @@ if (CREATE_COMPILATION_DATABASE_LINK)
6
6
endif ()
7
7
8
8
macro (bazel )
9
- execute_process (COMMAND bazel ${ARGN} COMMAND_ERROR_IS_FATAL ANY OUTPUT_STRIP_TRAILING_WHITESPACE )
9
+ execute_process (COMMAND bazel ${ARGN}
10
+ COMMAND_ERROR_IS_FATAL ANY
11
+ OUTPUT_STRIP_TRAILING_WHITESPACE
12
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} )
10
13
endmacro ()
11
14
12
15
bazel (info workspace OUTPUT_VARIABLE BAZEL_WORKSPACE )
You can’t perform that action at this time.
0 commit comments