mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-03 06:10:23 +00:00
propagate __config_site includes when building benchmarks
llvm-svn: 346933
This commit is contained in:
parent
95997f6110
commit
0997403a22
@ -18,11 +18,14 @@ if (DEFINED LIBCXX_CXX_ABI_LIBRARY_PATH)
|
|||||||
-L${LIBCXX_CXX_ABI_LIBRARY_PATH}
|
-L${LIBCXX_CXX_ABI_LIBRARY_PATH}
|
||||||
-Wl,-rpath,${LIBCXX_CXX_ABI_LIBRARY_PATH})
|
-Wl,-rpath,${LIBCXX_CXX_ABI_LIBRARY_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
if (LIBCXX_NEEDS_SITE_CONFIG)
|
||||||
|
list(APPEND BENCHMARK_LIBCXX_COMPILE_FLAGS -include "${LIBCXX_BINARY_DIR}/__config_site")
|
||||||
|
endif()
|
||||||
split_list(BENCHMARK_LIBCXX_COMPILE_FLAGS)
|
split_list(BENCHMARK_LIBCXX_COMPILE_FLAGS)
|
||||||
|
|
||||||
ExternalProject_Add(google-benchmark-libcxx
|
ExternalProject_Add(google-benchmark-libcxx
|
||||||
EXCLUDE_FROM_ALL ON
|
EXCLUDE_FROM_ALL ON
|
||||||
DEPENDS cxx
|
DEPENDS cxx cxx-headers
|
||||||
PREFIX benchmark-libcxx
|
PREFIX benchmark-libcxx
|
||||||
SOURCE_DIR ${LIBCXX_SOURCE_DIR}/utils/google-benchmark
|
SOURCE_DIR ${LIBCXX_SOURCE_DIR}/utils/google-benchmark
|
||||||
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx
|
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx
|
||||||
@ -91,6 +94,11 @@ set(BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS
|
|||||||
${SANITIZER_FLAGS}
|
${SANITIZER_FLAGS}
|
||||||
-Wno-user-defined-literals
|
-Wno-user-defined-literals
|
||||||
)
|
)
|
||||||
|
if (LIBCXX_NEEDS_SITE_CONFIG)
|
||||||
|
list(APPEND BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS
|
||||||
|
-include "${LIBCXX_BINARY_DIR}/__config_site")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(BENCHMARK_TEST_LIBCXX_LINK_FLAGS
|
set(BENCHMARK_TEST_LIBCXX_LINK_FLAGS
|
||||||
-nodefaultlibs
|
-nodefaultlibs
|
||||||
-L${BENCHMARK_LIBCXX_INSTALL}/lib/
|
-L${BENCHMARK_LIBCXX_INSTALL}/lib/
|
||||||
@ -116,7 +124,7 @@ macro(add_benchmark_test name source_file)
|
|||||||
set(libcxx_target ${name}_libcxx)
|
set(libcxx_target ${name}_libcxx)
|
||||||
list(APPEND libcxx_benchmark_targets ${libcxx_target})
|
list(APPEND libcxx_benchmark_targets ${libcxx_target})
|
||||||
add_executable(${libcxx_target} EXCLUDE_FROM_ALL ${source_file})
|
add_executable(${libcxx_target} EXCLUDE_FROM_ALL ${source_file})
|
||||||
add_dependencies(${libcxx_target} cxx google-benchmark-libcxx)
|
add_dependencies(${libcxx_target} cxx cxx-headers google-benchmark-libcxx)
|
||||||
add_dependencies(cxx-benchmarks ${libcxx_target})
|
add_dependencies(cxx-benchmarks ${libcxx_target})
|
||||||
if (LIBCXX_ENABLE_SHARED)
|
if (LIBCXX_ENABLE_SHARED)
|
||||||
target_link_libraries(${libcxx_target} cxx_shared)
|
target_link_libraries(${libcxx_target} cxx_shared)
|
||||||
|
Loading…
Reference in New Issue
Block a user