From 82f9d834ad772b2f16b6524f679d14d8a7afe881 Mon Sep 17 00:00:00 2001 From: Gabriele Contini <gcontini@users.noreply.github.com> Date: 周二, 10 9月 2019 23:29:10 +0800 Subject: [PATCH] fix issue #37 tests in windows --- test/library/CMakeLists.txt | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/test/library/CMakeLists.txt b/test/library/CMakeLists.txt index c8c638c..314aa6f 100644 --- a/test/library/CMakeLists.txt +++ b/test/library/CMakeLists.txt @@ -1,9 +1,8 @@ -link_directories ( ${Boost_LIBRARY_DIRS} ) - add_executable( license_reader_test LicenseReader_test.cpp ) +#add_dependencies( license_reader_test boost_filesystem ) target_link_libraries( license_reader_test @@ -11,5 +10,26 @@ ${Boost_LIBRARIES} ) -SET_TARGET_PROPERTIES(license_reader_test PROPERTIES LINK_SEARCH_START_STATIC ON) -ADD_TEST(license_reader_test ${EXECUTABLE_OUTPUT_PATH}/LicenseReader_test) +#SET_TARGET_PROPERTIES(license_reader_test PROPERTIES LINK_SEARCH_START_STATIC ON) +#SET_TARGET_PROPERTIES(license_reader_test PROPERTIES LINK_SEARCH_END_STATIC OFF) +ADD_TEST(NAME license_reader_test COMMAND license_reader_test) + +IF(WIN32) +#test windows +ELSE(WIN32) + add_executable( + os_linux_test + Os_Linux_test.cpp + ) + + target_link_libraries( + os_linux_test + os + ${Boost_LIBRARIES} + ) + + #add_dependencies( os_linux_test ) + #SET_TARGET_PROPERTIES(os_linux_test PROPERTIES LINK_SEARCH_START_STATIC ON) + ADD_TEST(NAME os_linux_test COMMAND os_linux_test) + +ENDIF(WIN32) -- Gitblit v1.9.1