summaryrefslogtreecommitdiffstats
path: root/libcxx/utils/google-benchmark/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/utils/google-benchmark/src/CMakeLists.txt')
-rw-r--r--libcxx/utils/google-benchmark/src/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/libcxx/utils/google-benchmark/src/CMakeLists.txt b/libcxx/utils/google-benchmark/src/CMakeLists.txt
index 6dab64b73bd..a65723b0997 100644
--- a/libcxx/utils/google-benchmark/src/CMakeLists.txt
+++ b/libcxx/utils/google-benchmark/src/CMakeLists.txt
@@ -1,6 +1,11 @@
# Allow the source files to find headers in src/
include_directories(${PROJECT_SOURCE_DIR}/src)
+if (DEFINED BENCHMARK_CXX_LINKER_FLAGS)
+ list(APPEND CMAKE_SHARED_LINKER_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS})
+ list(APPEND CMAKE_MODULE_LINKER_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS})
+endif()
+
# Define the source files
set(SOURCE_FILES "benchmark.cc" "colorprint.cc" "commandlineflags.cc"
"console_reporter.cc" "csv_reporter.cc" "json_reporter.cc"
@@ -19,7 +24,6 @@ endif()
add_library(benchmark ${SOURCE_FILES} ${RE_FILES})
-
set_target_properties(benchmark PROPERTIES
OUTPUT_NAME "benchmark"
VERSION ${GENERIC_LIB_VERSION}
@@ -27,7 +31,7 @@ set_target_properties(benchmark PROPERTIES
)
# Link threads.
-target_link_libraries(benchmark ${CMAKE_THREAD_LIBS_INIT})
+target_link_libraries(benchmark ${BENCHMARK_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
# We need extra libraries on Windows
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
OpenPOWER on IntegriCloud