aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt
index 829fb8e94..596ab1017 100644
--- a/host/tests/CMakeLists.txt
+++ b/host/tests/CMakeLists.txt
@@ -48,7 +48,11 @@ SET(test_sources
)
#turn each test cpp file into an executable with an int main() function
-ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
+IF(MINGW)
+ ADD_DEFINITIONS(-DBOOST_TEST_MAIN)
+ELSE()
+ ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
+ENDIF()
SET(UHD_TEST_TARGET_DEPS uhd)
SET(UHD_TEST_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
@@ -57,7 +61,7 @@ SET(UHD_TEST_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
FOREACH(test_source ${test_sources})
GET_FILENAME_COMPONENT(test_name ${test_source} NAME_WE)
ADD_EXECUTABLE(${test_name} ${test_source})
- TARGET_LINK_LIBRARIES(${test_name} uhd)
+ TARGET_LINK_LIBRARIES(${test_name} uhd ${Boost_LIBRARIES})
UHD_ADD_TEST(${test_name} ${test_name})
UHD_INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
ENDFOREACH(test_source)