forked from OSchip/llvm-project
Pass compilers when configuring Google Benchmark.
llvm-svn: 277512
This commit is contained in:
parent
eb09609f39
commit
84c557ad3e
|
@ -26,7 +26,9 @@ ExternalProject_Add(google-benchmark-libcxx
|
|||
PREFIX benchmark-libcxx
|
||||
SOURCE_DIR ${LIBCXX_SOURCE_DIR}/utils/google-benchmark
|
||||
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx
|
||||
CMAKE_CACHE_DEFAULT_ARGS
|
||||
CMAKE_CACHE_ARGS
|
||||
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RELEASE
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
||||
-DCMAKE_CXX_FLAGS:STRING=${BENCHMARK_LIBCXX_COMPILE_FLAGS}
|
||||
|
@ -45,7 +47,9 @@ if (LIBCXX_BUILD_BENCHMARK_NATIVE_STDLIB)
|
|||
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native
|
||||
CMAKE_CACHE_ARGS
|
||||
-DBENCHMARK_ENABLE_TESTING:BOOL=OFF
|
||||
CMAKE_CACHE_DEFAULT_ARGS
|
||||
CMAKE_CACHE_ARGS
|
||||
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RELEASE
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>)
|
||||
endif()
|
||||
|
@ -63,6 +67,7 @@ set(BENCHMARK_TEST_COMPILE_FLAGS
|
|||
)
|
||||
set(BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS
|
||||
-nostdinc++
|
||||
-cxx-isystem ${LIBCXX_SOURCE_DIR}/include
|
||||
${BENCHMARK_TEST_COMPILE_FLAGS}
|
||||
-Wno-user-defined-literals
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue