diff --git a/.travis.yml b/.travis.yml index d53145f35..9703ab3b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ matrix: - gcc-mingw-w64-x86-64 - gcc-mingw-w64 - os: linux - compiler: x86_64-w64-mingw32-gcc + compiler: i686-w64-mingw32-gcc env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release addons: apt: diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f3753ff4..832c5628c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -318,6 +318,11 @@ if(BUILD_TESTING) endif() endif() +# Allow the use of CTEST_USE_LAUNCHERS even when not including CTest (mingw builds) +# CTestUseLaunchers module is only available starting cmake >= 3.0. Using OPTIONAL flag +# to cope with it +include(CTestUseLaunchers OPTIONAL) + #----------------------------------------------------------------------------- # install all targets referenced as OPENJPEGTargets install(EXPORT OpenJPEGTargets DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}) diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index f8c50e5be..287e79598 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -23,6 +23,15 @@ else() set( JPYLYZER_EXT "py" ) endif() +# Choose CTest reporting mode. +if(NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Make") + # Launchers work only with Makefile generators. + set(CTEST_USE_LAUNCHERS 0) +elseif(NOT DEFINED CTEST_USE_LAUNCHERS) + # The setting is ignored by CTest < 2.8 so we need no version test. + set(CTEST_USE_LAUNCHERS 1) +endif() + if ("$ENV{OPJ_BUILD_CONFIGURATION}" STREQUAL "") set( CTEST_BUILD_CONFIGURATION "Release") else() @@ -112,6 +121,8 @@ OPJ_DATA_ROOT:PATH=$ENV{PWD}/data # jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT} +# Better build error/warning reports on the dashboard +CTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS} " ) #--------------------- diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 1a4c0bb97..b01a688ae 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -35,7 +35,7 @@ if [ "${COVERITY_SCAN_BRANCH:-}" == "1" ] || [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; exit 0 fi -if [ "${OPJ_CI_ASAN:-}" == "1" ]; then +if [ "${TRAVIS_OS_NAME:-}" == "linux" ]; then # We need a new version of cmake than travis-ci provides wget --no-check-certificate -qO - https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz | tar -xz # copy to a directory that will not changed every version @@ -62,7 +62,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data # We need jpylyzer for the test suite - JPYLYZER_VERSION="1.17.0" + JPYLYZER_VERSION="1.17.0" echo "Retrieving jpylyzer" if [ "${APPVEYOR:-}" == "True" ]; then wget --local-encoding=UTF-8 -q http://dl.bintray.com/openplanets/opf-windows/jpylyzer_${JPYLYZER_VERSION}_win32.zip