--- CMakeLists.txt 2016-10-28 16:22:22.000000000 -0500 | |
+++ CMakeLists.txt.new 2017-01-24 16:31:51.045598240 -0600 | |
@@ -21,6 +21,10 @@ | |
# 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") |