From 4ad6990ec919f7050faa70e8fb4059f7e514e641 Mon Sep 17 00:00:00 2001 From: Bernd Porr Date: Mon, 19 Feb 2024 11:45:36 +0000 Subject: [PATCH] Added threads to link to --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de8c1c2..93d9f98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,13 +9,15 @@ add_compile_options(-Wall -Wconversion -Wextra -pedantic) include(GNUInstallDirs) enable_testing() +find_package (Threads) + add_library(cpptimer INTERFACE) add_executable(demo demo.cpp) -TARGET_LINK_LIBRARIES(demo cpptimer) +TARGET_LINK_LIBRARIES(demo cpptimer ${CMAKE_THREAD_LIBS_INIT}) add_executable(demo_runnable demo_runnable.cpp) -TARGET_LINK_LIBRARIES(demo_runnable cpptimer) +TARGET_LINK_LIBRARIES(demo_runnable cpptimer${CMAKE_THREAD_LIBS_INIT}) add_subdirectory(test)