should link properly on linux/osx
diff --git a/scripts/cmake/common.cmake b/scripts/cmake/common.cmake
index 7ed585b..3ba8bb7 100644
--- a/scripts/cmake/common.cmake
+++ b/scripts/cmake/common.cmake
@@ -12,6 +12,8 @@
enable_testing()
+find_package(Threads)
+
set(DOCTEST_TEST_MODE "COMPARE" CACHE STRING "Test mode - normal/run through valgrind/collect output/compare with output")
set_property(CACHE DOCTEST_TEST_MODE PROPERTY STRINGS "NORMAL;VALGRIND;COLLECT;COMPARE")
@@ -61,6 +63,7 @@
function(doctest_add_executable name)
add_executable(${name} ${ARGN})
add_dependencies(${name} assemble_single_header)
+ target_link_libraries(${name} ${CMAKE_THREAD_LIBS_INIT})
endfunction()
function(doctest_add_library name)