diff --git a/test/cpp-utils/CMakeLists.txt b/test/cpp-utils/CMakeLists.txt index dc132db6..cc799a9c 100644 --- a/test/cpp-utils/CMakeLists.txt +++ b/test/cpp-utils/CMakeLists.txt @@ -53,5 +53,10 @@ add_executable(${PROJECT_NAME} ${SOURCES}) target_link_libraries(${PROJECT_NAME} googletest cpp-utils) add_test(${PROJECT_NAME} ${PROJECT_NAME}) +# This is needed by boost thread +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(${PROJECT_NAME} PUBLIC rt) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_enable_style_warnings(${PROJECT_NAME}) target_activate_cpp14(${PROJECT_NAME}) diff --git a/test/fspp/CMakeLists.txt b/test/fspp/CMakeLists.txt index 3df535d7..7eaed7d9 100644 --- a/test/fspp/CMakeLists.txt +++ b/test/fspp/CMakeLists.txt @@ -106,5 +106,10 @@ add_executable(${PROJECT_NAME} ${SOURCES}) target_link_libraries(${PROJECT_NAME} googletest fspp) add_test(${PROJECT_NAME} ${PROJECT_NAME}) +# This is needed by boost thread +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(${PROJECT_NAME} PUBLIC rt) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_enable_style_warnings(${PROJECT_NAME}) target_activate_cpp14(${PROJECT_NAME})