Permalink
Browse files

Link cu with librt on non-Apple Unix platforms

Fixes #28.
  • Loading branch information...
jamiesnape committed Nov 18, 2016
1 parent 5e80bdd commit 075ee4c5022c4c82f731909cefc897f822bfb47c
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/testsuites/cu/CMakeLists.txt
@@ -6,6 +6,11 @@ add_library(cu STATIC ${CU_SOURCES})
if(NOT APPLE)
target_compile_definitions(cu PUBLIC CU_ENABLE_TIMER)
find_library(LIBRT_LIBRARY NAMES rt)
if(NOT LIBRT_LIBRARY)
message(FATAL_ERROR "Could NOT find required library librt")
endif()
target_link_libraries(cu "${LIBRT_LIBRARY}")
endif()
get_filename_component(CU_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" DIRECTORY)

0 comments on commit 075ee4c

Please sign in to comment.