diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2014-12-19 14:52:57 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-01-13 09:46:41 +0100 |
commit | 3f9ef46bc51acc5933721974e191d2a9659f6566 (patch) | |
tree | 9dc0b36ab3f9f70ce0a7d0629e1a56aa2b41aed1 /host/tests/CMakeLists.txt | |
parent | be5f9613311d944b8971570bff444c5af094f0f5 (diff) | |
download | uhd-3f9ef46bc51acc5933721974e191d2a9659f6566.tar.gz uhd-3f9ef46bc51acc5933721974e191d2a9659f6566.tar.bz2 uhd-3f9ef46bc51acc5933721974e191d2a9659f6566.zip |
Added support for MinGW cross-compile
* Added CMake toolchain file, compatible with different versions
* No dependency on MinGW runtime, all statically linked
* Misc coding tweaks to allow MinGW to compile
Diffstat (limited to 'host/tests/CMakeLists.txt')
-rw-r--r-- | host/tests/CMakeLists.txt | 8 |
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) |