Skip to content

Commit 012dd8b

Browse files
authored
[libcxx] Passthrough the necessary CMake variables to benchmarks (#116644)
This addresses the issue uncovered by #115361. Previously, we weren't building benchmarks in many cases due to the following block: https://github.com/llvm/llvm-project/blob/e58949632e91477af58d983f3b66369e6a2c8233/libcxx/CMakeLists.txt#L162-L172 We need to passthrough the necessary variables into the benchmarks subbuild and use correct syntax.
1 parent 41c86ca commit 012dd8b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libcxx/test/benchmarks/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ ExternalProject_Add(google-benchmark
3535
SOURCE_DIR ${LLVM_THIRD_PARTY_DIR}/benchmark
3636
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/google-benchmark
3737
CMAKE_CACHE_ARGS
38-
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
39-
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
38+
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
39+
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
40+
-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}
4041
-DCMAKE_BUILD_TYPE:STRING=RELEASE
4142
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
4243
-DCMAKE_CXX_FLAGS:STRING=${BENCHMARK_COMPILE_FLAGS}
4344
-DBENCHMARK_USE_LIBCXX:BOOL=ON
4445
-DBENCHMARK_ENABLE_TESTING:BOOL=OFF
45-
-DBENCHMARK_CXX_LIBRARIES:STRING="${BENCHMARK_CXX_LIBRARIES}")
46+
-DBENCHMARK_CXX_LIBRARIES:STRING=${BENCHMARK_CXX_LIBRARIES})
4647

4748
add_dependencies(cxx-test-depends google-benchmark)

0 commit comments

Comments
 (0)