Skip to content
Snippets Groups Projects
Commit 6b73b47b authored by Matus Novak's avatar Matus Novak
Browse files

Fix mingw compilation errors

added --output-on-failure to ctest
parent 0312c917
No related branches found
No related tags found
No related merge requests found
Pipeline #4995 failed
......@@ -67,17 +67,10 @@ build_script:
- cmd: if [%COMPILER%]==[msvc] (cd build & cmake --build . --target ALL_BUILD --config MinSizeRel || exit 1 & cd ..)
test_script:
- cmd: if [%COMPILER%]==[mingw] (cd build-debug & ctest --verbose || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[mingw] (cd build-release & ctest --verbose || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[msvc] (cd build & ctest --verbose -C "Debug" || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[msvc] (cd build & ctest --verbose -C "MinSizeRel" || exit 1 & cd ..)
after_test:
- cmd: if [%COMPILER%]==[mingw] (cd build-debug & cmake --build . --target install || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[msvc] (cd build & cmake --build . --target INSTALL --config Debug || exit 1 & cd ..)
# - cmd: ren install debug
- cmd: if [%COMPILER%]==[mingw] (cd build-release & cmake --build . --target install || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[msvc] (cd build & cmake --build . --target INSTALL --config MinSizeRel || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[mingw] (cd build-debug & ctest --verbose --output-on-failure || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[mingw] (cd build-release & ctest --verbose --output-on-failure || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[msvc] (cd build & ctest --verbose --output-on-failure -C "Debug" || exit 1 & cd ..)
- cmd: if [%COMPILER%]==[msvc] (cd build & ctest --verbose --output-on-failure -C "MinSizeRel" || exit 1 & cd ..)
#---------------------------------#
# notifications #
......
......@@ -13,6 +13,9 @@ foreach(FILENAME ${TESTS})
target_include_directories(${TEST_PROJ} PRIVATE ${CATCH2_INCLUDE_DIR})
target_link_libraries(${TEST_PROJ} ${CMAKE_THREAD_LIBS_INIT})
if(WIN32)
target_link_libraries(${TEST_PROJ} wsock32 ws2_32)
endif()
if(MSVC)
set_target_properties(${TEST_PROJ} PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment