mirror of
https://github.com/google/benchmark.git
synced 2025-01-30 22:00:16 +08:00
Fix librt linking on systems which has it (#331)
This commit is contained in:
parent
4bf28e611b
commit
34010beecb
@ -21,6 +21,10 @@ set_target_properties(benchmark PROPERTIES
|
||||
|
||||
# Link threads.
|
||||
target_link_libraries(benchmark ${BENCHMARK_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
find_library(LIBRT rt)
|
||||
if(LIBRT)
|
||||
target_link_libraries(benchmark ${LIBRT})
|
||||
endif()
|
||||
|
||||
# We need extra libraries on Windows
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
|
Loading…
Reference in New Issue
Block a user