Commit 34010bee by Alt Committed by Dominic Hamon

Fix librt linking on systems which has it (#331)

parent 4bf28e61
...@@ -21,6 +21,10 @@ set_target_properties(benchmark PROPERTIES ...@@ -21,6 +21,10 @@ set_target_properties(benchmark PROPERTIES
# Link threads. # Link threads.
target_link_libraries(benchmark ${BENCHMARK_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) 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 # We need extra libraries on Windows
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment