projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the C++11 thread linking issues for unit tests as well.
[pulseview.git]
/
test
/
CMakeLists.txt
diff --git
a/test/CMakeLists.txt
b/test/CMakeLists.txt
index 6886f94a07cae3fb341c8a362e59e75cd7209525..9d839cb0970b7d39239df107eaf4f7e01e127fbb 100644
(file)
--- a/
test/CMakeLists.txt
+++ b/
test/CMakeLists.txt
@@
-31,6
+31,10
@@
pkg_check_modules(PKGDEPS REQUIRED ${PKGDEPS})
find_package(Boost 1.42 COMPONENTS filesystem system unit_test_framework REQUIRED)
find_package(Boost 1.42 COMPONENTS filesystem system unit_test_framework REQUIRED)
+# Find the platform's thread library (needed for C++11 threads).
+# This will set ${CMAKE_THREAD_LIBS_INIT} to the correct, OS-specific value.
+find_package(Threads REQUIRED)
+
find_program(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 qmake-mac)
find_package(Qt4 REQUIRED)
find_program(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 qmake-mac)
find_package(Qt4 REQUIRED)
@@
-136,7
+140,7
@@
endif()
# On MinGW we need to use static linking.
if(NOT WIN32)
# On MinGW we need to use static linking.
if(NOT WIN32)
-add_definitions(-DBOOST_TEST_DYN_LINK)
+
add_definitions(-DBOOST_TEST_DYN_LINK)
endif()
add_definitions(${QT_DEFINITIONS})
endif()
add_definitions(${QT_DEFINITIONS})
@@
-150,6
+154,7
@@
set(PULSEVIEW_LINK_LIBS
${Boost_LIBRARIES}
${PKGDEPS_LIBRARIES}
${QT_LIBRARIES}
${Boost_LIBRARIES}
${PKGDEPS_LIBRARIES}
${QT_LIBRARIES}
+ ${CMAKE_THREAD_LIBS_INIT}
)
if(WIN32)
)
if(WIN32)