From 6daf86c2add0669d78d0a9dea7d8cd408452a044 Mon Sep 17 00:00:00 2001 From: Martin Beseda <martinbeseda@seznam.cz> Date: Thu, 13 Sep 2018 19:04:12 +0200 Subject: [PATCH] Enabled Windows shared dependencies test in CI --- .gitlab-ci.yml | 31 +++++++++---------- .../windows/win_VS_build_x64_debug.bat | 4 +-- src/CMakeLists.txt | 4 +-- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ababa6f..ff058110 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,22 +21,21 @@ win_visual_studio_static_deps: # downloaded and compiled locally as # submodules and link dynamically # -# CURRENTLY NOT SUPPORTED! -#win_visual_studio_shared_deps: -# tags: -# - Win -# -# before_script: -# - call VsDevCmd.bat -# - cd build_scripts\windows -# - call win_download_dependencies.bat -# - cd ..\.. -# - cd build_scripts\windows -# - set DEPENDENCIES_LINK_TYPE=shared -# - call win_VS_build_x64_debug.bat -# -# script: -# - call win_run_tests.bat +win_visual_studio_shared_deps: + tags: + - Win + + before_script: + - call VsDevCmd.bat + - cd build_scripts\windows + - call win_download_dependencies.bat + - cd ..\.. + - cd build_scripts\windows + - set DEPENDENCIES_LINK_TYPE=shared + - call win_VS_build_x64_debug.bat + + script: + - call win_run_tests.bat # Latest Ubuntu with Boost and Exprtk diff --git a/build_scripts/windows/win_VS_build_x64_debug.bat b/build_scripts/windows/win_VS_build_x64_debug.bat index 98095e2e..ea146fca 100644 --- a/build_scripts/windows/win_VS_build_x64_debug.bat +++ b/build_scripts/windows/win_VS_build_x64_debug.bat @@ -103,10 +103,10 @@ IF "%BUILD_SOMETHING_LIB%"=="yes" ( set MAKEFILE_GENERATOR="Visual Studio 15 2017 Win64" cd ..\.. - cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=%CXX_COMPILER% -DCMAKE_C_COMPILER=%C_COMPILER% -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% -DBUILD_TESTS=%BUILD_TESTS% -DBUILD_EXAMPLES=%BUILD_EXAMPLES% -DBUILD_LIB=%BUILD_LIB% -DLIB4NEURO_DIR=build\lib -DDEPENDENCIES_LINK_TYPE=%DEPENDENCIES_LINK_TYPE% . || exit 1 + cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=%CXX_COMPILER% -DCMAKE_C_COMPILER=%C_COMPILER% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% -DBUILD_TESTS=%BUILD_TESTS% -DBUILD_EXAMPLES=%BUILD_EXAMPLES% -DBUILD_LIB=%BUILD_LIB% -DLIB4NEURO_DIR=build\lib -DDEPENDENCIES_LINK_TYPE=%DEPENDENCIES_LINK_TYPE% . || exit 1 title Building the 'lib4neuro' project for Debug (building) - (cmake --build . --config Debug) && (echo "Build complete.") || exit 1 + (cmake --build .) && (echo "Build complete.") || exit 1 cd build_scripts\windows diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cff16459..9e7add36 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -60,8 +60,8 @@ if ("${BUILD_LIB}" STREQUAL "yes") # set(PREFIX "lib") # endif() if(WIN32 AND "${DEPENDENCIES_LINK_TYPE}" STREQUAL "shared") - message(FATAL_ERROR "Only static linking of external dependencies is supported for Windows systems now!") - elseif("${DEPENDENCIES_LINK_TYPE}" STREQUAL "static") + add_library(${PREFIX}boost_unit_test STATIC boost_test_lib_dummy.cpp) + elseif("${DEPENDENCIES_LINK_TYPE}" STREQUAL "static") add_library(${PREFIX}boost_unit_test STATIC boost_test_lib_dummy.cpp) elseif("${DEPENDENCIES_LINK_TYPE}" STREQUAL "shared") add_library(${PREFIX}boost_unit_test SHARED boost_test_lib_dummy.cpp) -- GitLab