mirror of
https://github.com/google/benchmark.git
synced 2025-03-14 03:10:22 +08:00
Require cmake 2.8.12 in order to support target_include_directories, and
simplify thread linking logic.
This commit is contained in:
parent
a6ad799a4d
commit
89a1edae15
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_minimum_required (VERSION 2.8.12)
|
||||
project (benchmark)
|
||||
|
||||
option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." ON)
|
||||
|
@ -18,14 +18,9 @@ else()
|
||||
endif()
|
||||
|
||||
add_library(benchmark ${SOURCE_FILES} ${RE_FILES})
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# Link threading if building a shared library, otherwise let client do it.
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries(benchmark PRIVATE ${CMAKE_THREAD_LIBS_INIT})
|
||||
else()
|
||||
target_link_libraries(benchmark ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(benchmark ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
set_target_properties(benchmark PROPERTIES
|
||||
OUTPUT_NAME "benchmark"
|
||||
|
Loading…
Reference in New Issue
Block a user