Skip to content

Commit

Permalink
Pass additional libraries to google benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed Oct 30, 2024
1 parent 2128aa5 commit 55800ff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions libcxx/test/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ if (DEFINED LIBCXX_CXX_ABI_LIBRARY_PATH)
-L${LIBCXX_CXX_ABI_LIBRARY_PATH}
-Wl,-rpath,${LIBCXX_CXX_ABI_LIBRARY_PATH})
endif()
split_list(BENCHMARK_COMPILE_FLAGS)

set(BENCHMARK_CXX_LIBRARIES)
list(APPEND BENCHMARK_CXX_LIBRARIES c++)
if (NOT LIBCXX_ENABLE_SHARED)
list(APPEND BENCHMARK_COMPILE_FLAGS -lc++abi)
list(APPEND BENCHMARK_CXX_LIBRARIES c++abi)
endif()
split_list(BENCHMARK_COMPILE_FLAGS)

ExternalProject_Add(google-benchmark
EXCLUDE_FROM_ALL ON
Expand All @@ -38,6 +41,7 @@ ExternalProject_Add(google-benchmark
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_CXX_FLAGS:STRING=${BENCHMARK_COMPILE_FLAGS}
-DBENCHMARK_USE_LIBCXX:BOOL=ON
-DBENCHMARK_ENABLE_TESTING:BOOL=OFF)
-DBENCHMARK_ENABLE_TESTING:BOOL=OFF
-DBENCHMARK_CXX_LIBRARIES:STRING="${BENCHMARK_CXX_LIBRARIES}")

add_dependencies(cxx-test-depends google-benchmark)

0 comments on commit 55800ff

Please sign in to comment.