From 6f5db32d147166ab1617c66844e3297eededc704 Mon Sep 17 00:00:00 2001 From: Gabriele Contini <gcontini@users.noreply.github.com> Date: ćšć, 19 9æ 2019 20:20:18 +0800 Subject: [PATCH] Feature/mingw cross compile (#51) --- test/library/CMakeLists.txt | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/test/library/CMakeLists.txt b/test/library/CMakeLists.txt index 6a1f0d0..49edff0 100644 --- a/test/library/CMakeLists.txt +++ b/test/library/CMakeLists.txt @@ -1 +1,34 @@ -add_subdirectory(reader) \ No newline at end of file +add_executable( + license_reader_test + LicenseReader_test.cpp +) + +target_link_libraries( + license_reader_test + licensepp_static + ${Boost_LIBRARIES} +) + +IF( ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") AND CMAKE_CROSSCOMPILING) +#binfmt_misc doesn't work in my system :( + ADD_TEST(NAME license_reader_test COMMAND wine ${CMAKE_CURRENT_BINARY_DIR}/license_reader_test) +ELSE() + ADD_TEST(NAME license_reader_test COMMAND license_reader_test) +ENDIF() + +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_TEST(NAME os_linux_test COMMAND os_linux_test) +ENDIF(WIN32) -- Gitblit v1.9.1