summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-25 15:09:53 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-05-25 15:10:06 (GMT)
commit3ed8b663a9fd6e8d6f7ec0571ab1e3530f9156db (patch)
tree0a8b030dd26e121451aceca82e8ddef8439a81ae
parenta354b7f21e858728606ddc7c275bad35914d8eaa (diff)
parentb566f0b30817270c89fc64bb11fade61bd08d0c0 (diff)
downloadCMake-3ed8b663a9fd6e8d6f7ec0571ab1e3530f9156db.zip
CMake-3ed8b663a9fd6e8d6f7ec0571ab1e3530f9156db.tar.gz
CMake-3ed8b663a9fd6e8d6f7ec0571ab1e3530f9156db.tar.bz2
Merge topic 'gitlab-ci-regular-builders'
b566f0b308 gitlab-ci: add windows builder 5b564c371e gitlab-ci: add Windows infrastructure 809f9a9916 gitlab: add powershell scripts for utilities 02c56b71a1 gitlab-ci: add a macos builder a1b1fc611b gitlab-ci: add Linux makefiles and ninja builders 3e1a1ba92d ci: add dependencies for the test suite to the Fedora image d5438f783a ci: add make to the CI image 0ed7e424ab gitlab-ci: use the cmake_build_unix anchor ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4723
-rw-r--r--.gitlab-ci.yml360
-rwxr-xr-x.gitlab/ci/cmake.ps118
-rwxr-xr-x.gitlab/ci/cmake.sh30
-rw-r--r--.gitlab/ci/configure_common.cmake10
-rw-r--r--.gitlab/ci/configure_fedora31_makefiles.cmake1
-rw-r--r--.gitlab/ci/configure_fedora31_ninja.cmake1
-rw-r--r--.gitlab/ci/configure_macos_makefiles.cmake1
-rw-r--r--.gitlab/ci/configure_macos_ninja.cmake1
-rw-r--r--.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake3
-rw-r--r--.gitlab/ci/ctest_build.cmake11
-rw-r--r--.gitlab/ci/ctest_exclusions.cmake1
-rwxr-xr-x.gitlab/ci/docker/fedora31/install_deps.sh8
-rwxr-xr-x.gitlab/ci/ninja.ps117
-rwxr-xr-x.gitlab/ci/ninja.sh26
-rwxr-xr-x.gitlab/ci/sccache.ps122
-rwxr-xr-x.gitlab/ci/sccache.sh28
-rwxr-xr-x.gitlab/ci/vcvarsall.ps19
-rw-r--r--CTestCustom.cmake.in1
-rw-r--r--Tests/CMakeLists.txt1
-rw-r--r--Tests/CPackWiXGenerator/CMakeLists.txt3
-rw-r--r--Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake4
-rw-r--r--Tests/RunCMake/export/DependOnDoubleExport-stderr.txt3
22 files changed, 495 insertions, 64 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0a55ca3..5795af8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,7 +4,7 @@
- tags@cmake/cmake
.fedora31: &fedora31
- image: "kitware/cmake:ci-fedora31-x86_64-2020-05-05"
+ image: "kitware/cmake:ci-fedora31-x86_64-2020-05-08"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/gitlab-kitware-cmake ci"
@@ -21,6 +21,7 @@
variables:
CMAKE_CONFIGURATION: debian10_iwyu
CTEST_NO_WARNINGS_ALLOWED: 1
+ CMake_SKIP_INSTALL: 1
.fedora31_tidy: &fedora31_tidy
extends: .fedora31
@@ -28,6 +29,7 @@
variables:
CMAKE_CONFIGURATION: fedora31_tidy
CTEST_NO_WARNINGS_ALLOWED: 1
+ CMake_SKIP_INSTALL: 1
.fedora31_sphinx: &fedora31_sphinx
extends: .fedora31
@@ -36,25 +38,124 @@
CMAKE_CONFIGURATION: fedora31_sphinx
CTEST_NO_WARNINGS_ALLOWED: 1
CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx"
+ CMake_SKIP_INSTALL: 1
-before_script:
+.fedora31_ninja: &fedora31_ninja
+ extends: .fedora31
+
+ variables:
+ CMAKE_CONFIGURATION: fedora31_ninja
+ CTEST_NO_WARNINGS_ALLOWED: 1
+
+.fedora31_makefiles: &fedora31_makefiles
+ extends: .fedora31
+
+ variables:
+ CMAKE_CONFIGURATION: fedora31_makefiles
+ CTEST_NO_WARNINGS_ALLOWED: 1
+ CMAKE_GENERATOR: "Unix Makefiles"
+
+.macos: &macos
+ variables:
+ # Note that shell runners only support runners with a single
+ # concurrency level. We can't use `$CI_CONCURRENCY_ID` because this may
+ # change between the build and test stages which CMake doesn't support.
+ # Even if we could, it could change if other runners on the machine
+ # could run at the same time, so we drop it.
+ GIT_CLONE_PATH: "$CI_BUILDS_DIR/gitlab-kitware-cmake ci"
+
+.macos_ninja: &macos_ninja
+ extends: .macos
+
+ variables:
+ CMAKE_CONFIGURATION: macos_ninja
+ CTEST_NO_WARNINGS_ALLOWED: 1
+
+.macos_makefiles: &macos_makefiles
+ extends: .macos
+
+ variables:
+ CMAKE_CONFIGURATION: macos_makefiles
+ CTEST_NO_WARNINGS_ALLOWED: 1
+ CMAKE_GENERATOR: "Unix Makefiles"
+
+.windows: &windows
+ variables:
+ # Note that shell runners only support runners with a single
+ # concurrency level. We can't use `$CI_CONCURRENCY_ID` because this may
+ # change between the build and test stages which CMake doesn't support.
+ # Even if we could, it could change if other runners on the machine
+ # could run at the same time, so we drop it.
+ # Blocked on https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/2122
+ #GIT_CLONE_PATH: "$CI_BUILDS_DIR\\gitlab-kitware-cmake ci"
+
+.windows_ninja: &windows_ninja
+ extends: .windows
+
+ variables:
+ # Debug and RelWithDebinfo build types use the `/Zi` which results in
+ # uncacheable compiations.
+ # https://github.com/mozilla/sccache/issues/242
+ CMAKE_BUILD_TYPE: Release
+ CTEST_NO_WARNINGS_ALLOWED: 1
+
+.windows_vs2019_x64_ninja: &windows_vs2019_x64_ninja
+ extends: .windows_ninja
+
+ variables:
+ CMAKE_CONFIGURATION: windows_vs2019_x64_ninja
+ VCVARSALL: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
+ VCVARSPLATFORM: x64
+
+.linux_builder_tags: &linux_builder_tags
+ tags:
+ - build
+ - docker
+ - linux
+
+.linux_builder_tags_qt: &linux_builder_tags_qt
+ tags:
+ - build
+ - docker
+ - linux
+ - linux-3.17 # Needed to be able to load Fedora's Qt libraries.
+
+.macos_builder_tags: &macos_builder_tags
+ tags:
+ - cmake # Since this is a bare runner, pin to a project.
+ - macos
+ - shell
+
+.windows_builder_tags: &windows_builder_tags
+ tags:
+ - cmake # Since this is a bare runner, pin to a project.
+ - windows
+ - shell
+
+.before_script_unix: &before_script_unix
- .gitlab/ci/cmake.sh
- .gitlab/ci/ninja.sh
- export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
- cmake --version
- ninja --version
+.before_script_windows: &before_script_windows
+ - Invoke-Expression -Command .gitlab/ci/cmake.ps1
+ - Invoke-Expression -Command .gitlab/ci/ninja.ps1
+ - $pwdpath = $pwd.Path
+ - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$pwdpath\.gitlab\cmake\bin;$env:PATH"
+ - cmake --version
+ - ninja --version
+
.cmake_build_unix: &cmake_build_unix
stage: build
only: *only_settings
- tags:
- - build
- - docker
- - linux
script:
+ - *before_script_unix
- .gitlab/ci/sccache.sh
- - sccache --start-server
+ # Allow the server to already be running.
+ - "sccache --start-server || :"
- sccache --show-stats
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
@@ -62,64 +163,223 @@ before_script:
interruptible: true
-stages:
- - build
- - test
-
-build:debian10-iwyu:
- <<:
- - *debian10_iwyu
+.cmake_build_windows: &cmake_build_windows
stage: build
only: *only_settings
- tags:
- - build
- - docker
- - linux
script:
- - .gitlab/ci/sccache.sh
+ - *before_script_windows
+ - Invoke-Expression -Command .gitlab/ci/sccache.ps1
+ - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- sccache --start-server
- sccache --show-stats
- - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
- - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
+ - ctest -VV -S .gitlab/ci/ctest_configure.cmake
+ - ctest -VV -S .gitlab/ci/ctest_build.cmake
- sccache --show-stats
+ - sccache --stop-server
+
interruptible: true
-build:fedora31-tidy:
- <<:
- - *fedora31_tidy
- stage: build
+.cmake_build_artifacts: &cmake_build_artifacts
+ artifacts:
+ expire_in: 1d
+ paths:
+ # XXX(globbing): Can be simplified with support from
+ # https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
+ - build/CTestTestfile.cmake
+ - build/*/CTestTestfile.cmake
+ - build/*/*/CTestTestfile.cmake
+ - build/*/*/*/CTestTestfile.cmake
+ - build/*/*/*/*/CTestTestfile.cmake
+
+ # Allow CMake to find CMAKE_ROOT.
+ - build/CMakeFiles/CMakeSourceDir.txt
+
+ # Take the install tree.
+ - build/install/
+
+ # We need the main binaries.
+ - build/bin/
+ # The cache is needed for the installation test.
+ - build/CMakeCache.txt
+ # Test binaries. Eventually these might be better under
+ # `Source/Tests` or the like.
+ - build/Tests/EnforceConfig.cmake
+ - build/Tests/CMakeBuildTest.cmake
+ - build/Tests/CMakeBuildDoubleProjectTest.cmake
+ - build/Tests/CMake*/runcompilecommands
+ - build/Tests/CMake*/runcompilecommands.exe
+ - build/Tests/CMake*/test*
+ - build/Tests/CMake*/PseudoMemcheck/valgrind
+ - build/Tests/CMake*/PseudoMemcheck/purify
+ - build/Tests/CMake*/PseudoMemcheck/memcheck_fail
+ - build/Tests/CMake*/PseudoMemcheck/BC
+ - build/Tests/CMake*/PseudoMemcheck/valgrind.exe
+ - build/Tests/CMake*/PseudoMemcheck/purify.exe
+ - build/Tests/CMake*/PseudoMemcheck/memcheck_fail.exe
+ - build/Tests/CMake*/PseudoMemcheck/BC.exe
+ - build/Tests/CMake*/PseudoMemcheck/NoLog
+ - build/Tests/CMake*Lib/*LibTests
+ - build/Tests/CMake*Lib/*LibTests.exe
+ - build/Source/kwsys/cmsysTest*
+ - build/Source/kwsys/testConsoleBufChild.exe
+ - build/Utilities/cmcurl/curltest
+ - build/Utilities/cmcurl/curltest.exe
+ - build/Utilities/KWIML/test/kwiml_test
+ - build/Utilities/KWIML/test/kwiml_test.exe
+ - build/Source/kwsys/*cmsysTestDynload.*
+ - build/Source/kwsys/dynloaddir/cmsysTestDynloadImpl.dll
+ - build/Source/kwsys/dynloaddir/cmsysTestDynloadUse.dll
+
+ # Test directories.
+ - build/Tests/CTest*
+ - build/Tests/Find*
+ - build/Tests/Qt5*
+ - build/Tests/RunCMake/
+ - build/Tests/CMakeOnly/
+ - build/Tests/CMakeTests/
+
+ # CTest/CDash information.
+ - build/Testing/
+ - build/DartConfiguation.tcl
+ - build/CTestCustom.cmake
+
+.cmake_test_artifacts: &cmake_test_artifacts
+ artifacts:
+ expire_in: 1d
+ paths:
+ # Take the install tree.
+ - build/install/
+
+.cmake_test_unix: &cmake_test_unix
+ stage: test
only: *only_settings
- tags:
- - build
- - docker
- - linux
script:
- - .gitlab/ci/sccache.sh
- - sccache --start-server
- - sccache --show-stats
- - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
- - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
- - sccache --show-stats
+ - *before_script_unix
+ - "$LAUNCHER ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake"
+
interruptible: true
-build:fedora31-sphinx:
- <<:
- - *fedora31_sphinx
- stage: build
+.cmake_test_windows: &cmake_test_windows
+ stage: test
only: *only_settings
- tags:
- - build
- - docker
- - linux
- - linux-3.17 # Needed to be able to load Fedora's Qt libraries.
script:
- - .gitlab/ci/sccache.sh
- - sccache --start-server
- - sccache --show-stats
- - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
- - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
- - sccache --show-stats
+ - *before_script_windows
+ - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
+ - ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake
+
interruptible: true
+
+stages:
+ - build
+ - test
+
+build:debian10-iwyu:
+ <<:
+ - *debian10_iwyu
+ - *cmake_build_unix
+ - *linux_builder_tags
+
+build:fedora31-tidy:
+ <<:
+ - *fedora31_tidy
+ - *cmake_build_unix
+ - *linux_builder_tags
+
+build:fedora31-sphinx:
+ <<:
+ - *fedora31_sphinx
+ - *cmake_build_unix
+ - *linux_builder_tags_qt
+
+build:fedora31-ninja:
+ <<:
+ - *fedora31_ninja
+ - *cmake_build_unix
+ - *cmake_build_artifacts
+ - *linux_builder_tags
+ when: manual
+
+test:fedora31-ninja:
+ <<:
+ - *fedora31_ninja
+ - *cmake_test_unix
+ - *linux_builder_tags_qt
+ dependencies:
+ - build:fedora31-ninja
+ needs:
+ - build:fedora31-ninja
+
+build:fedora31-makefiles:
+ <<:
+ - *fedora31_makefiles
+ - *cmake_build_unix
+ - *cmake_build_artifacts
+ - *linux_builder_tags
+ when: manual
+
+test:fedora31-makefiles:
+ <<:
+ - *fedora31_makefiles
+ - *cmake_test_unix
+ - *linux_builder_tags_qt
+ dependencies:
+ - build:fedora31-makefiles
+ needs:
+ - build:fedora31-makefiles
+
+build:macos-ninja:
+ <<:
+ - *macos_ninja
+ - *cmake_build_unix
+ - *cmake_build_artifacts
+ - *macos_builder_tags
+ when: manual
+
+test:macos-ninja:
+ <<:
+ - *macos_ninja
+ - *cmake_test_unix
+ - *macos_builder_tags
+ dependencies:
+ - build:macos-ninja
+ needs:
+ - build:macos-ninja
+
+build:macos-makefiles:
+ <<:
+ - *macos_makefiles
+ - *cmake_build_unix
+ - *cmake_build_artifacts
+ - *macos_builder_tags
+ when: manual
+
+test:macos-makefiles:
+ <<:
+ - *macos_makefiles
+ - *cmake_test_unix
+ - *macos_builder_tags
+ dependencies:
+ - build:macos-makefiles
+ needs:
+ - build:macos-makefiles
+
+build:windows-vs2019-x64-ninja:
+ <<:
+ - *windows_vs2019_x64_ninja
+ - *cmake_build_windows
+ - *cmake_build_artifacts
+ - *windows_builder_tags
+ when: manual
+
+test:windows-vs2019-x64-ninja:
+ <<:
+ - *windows_vs2019_x64_ninja
+ - *cmake_test_windows
+ - *windows_builder_tags
+ dependencies:
+ - build:windows-vs2019-x64-ninja
+ needs:
+ - build:windows-vs2019-x64-ninja
diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1
new file mode 100755
index 0000000..3b42cae
--- /dev/null
+++ b/.gitlab/ci/cmake.ps1
@@ -0,0 +1,18 @@
+$erroractionpreference = "stop"
+
+$version = "3.17.2"
+$sha256sum = "CF82B1EB20B6FBE583487656FCD496490FFCCDFBCBBA0F26E19F1C9C63B0B041"
+$filename = "cmake-$version-win64-x64"
+$tarball = "$filename.zip"
+
+$outdir = $pwd.Path
+$outdir = "$outdir\.gitlab"
+Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
+$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
+if ($hash.Hash -ne $sha256sum) {
+ exit 1
+}
+
+Add-Type -AssemblyName System.IO.Compression.FileSystem
+[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
+Move-Item -Path "$outdir\$filename" -Destination "$outdir\cmake"
diff --git a/.gitlab/ci/cmake.sh b/.gitlab/ci/cmake.sh
index 4b2f53f..658a62a 100755
--- a/.gitlab/ci/cmake.sh
+++ b/.gitlab/ci/cmake.sh
@@ -3,14 +3,38 @@
set -e
readonly version="3.17.2"
-readonly sha256sum="dc57f3cc448ca67fc8776b4ad4c22b087b9c6a8e459938b9622b8c7f4ef6b21e"
-readonly filename="cmake-$version-Linux-x86_64"
+
+case "$( uname -s )" in
+ Linux)
+ shatool="sha256sum"
+ sha256sum="dc57f3cc448ca67fc8776b4ad4c22b087b9c6a8e459938b9622b8c7f4ef6b21e"
+ platform="Linux"
+ ;;
+ Darwin)
+ shatool="shasum -a 256"
+ sha256sum="139500e20b080444fcafe57f24f57248c691c5187cce6695bee2b9aad6792c7d"
+ platform="Darwin"
+ ;;
+ *)
+ echo "Unrecognized platform $( uname -s )"
+ exit 1
+ ;;
+esac
+readonly shatool
+readonly sha256sum
+readonly platform
+
+readonly filename="cmake-$version-$platform-x86_64"
readonly tarball="$filename.tar.gz"
cd .gitlab
echo "$sha256sum $tarball" > cmake.sha256sum
curl -OL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball"
-sha256sum --check cmake.sha256sum
+$shatool --check cmake.sha256sum
tar xf "$tarball"
mv "$filename" cmake
+
+if [ "$( uname -s )" = "Darwin" ]; then
+ ln -s CMake.app/Contents/bin cmake/bin
+fi
diff --git a/.gitlab/ci/configure_common.cmake b/.gitlab/ci/configure_common.cmake
index fc2aaae..4585224 100644
--- a/.gitlab/ci/configure_common.cmake
+++ b/.gitlab/ci/configure_common.cmake
@@ -1,3 +1,13 @@
set(CTEST_USE_LAUNCHERS "ON" CACHE STRING "")
+# We run the install right after the build. Avoid rerunning it when installing.
+set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "ON" CACHE STRING "")
+# Install CMake under the build tree.
+set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "")
+set(CMake_TEST_INSTALL "OFF" CACHE BOOL "")
+
+if (NOT "$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
+ set(CMAKE_BUILD_TYPE "$ENV{CMAKE_BUILD_TYPE}" CACHE STRING "")
+endif ()
+
include("${CMAKE_CURRENT_LIST_DIR}/configure_sccache.cmake")
diff --git a/.gitlab/ci/configure_fedora31_makefiles.cmake b/.gitlab/ci/configure_fedora31_makefiles.cmake
new file mode 100644
index 0000000..33f0db0
--- /dev/null
+++ b/.gitlab/ci/configure_fedora31_makefiles.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/configure_fedora31_ninja.cmake b/.gitlab/ci/configure_fedora31_ninja.cmake
new file mode 100644
index 0000000..33f0db0
--- /dev/null
+++ b/.gitlab/ci/configure_fedora31_ninja.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/configure_macos_makefiles.cmake b/.gitlab/ci/configure_macos_makefiles.cmake
new file mode 100644
index 0000000..33f0db0
--- /dev/null
+++ b/.gitlab/ci/configure_macos_makefiles.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/configure_macos_ninja.cmake b/.gitlab/ci/configure_macos_ninja.cmake
new file mode 100644
index 0000000..33f0db0
--- /dev/null
+++ b/.gitlab/ci/configure_macos_ninja.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake b/.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake
new file mode 100644
index 0000000..e2f00dd
--- /dev/null
+++ b/.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake
@@ -0,0 +1,3 @@
+set(CMake_TEST_WIX_NO_VERIFY "ON" CACHE BOOL "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/ctest_build.cmake b/.gitlab/ci/ctest_build.cmake
index 28bdb35..6402a5d 100644
--- a/.gitlab/ci/ctest_build.cmake
+++ b/.gitlab/ci/ctest_build.cmake
@@ -28,3 +28,14 @@ if ("$ENV{CTEST_NO_WARNINGS_ALLOWED}" AND num_warnings GREATER 0)
message(FATAL_ERROR
"Found ${num_warnings} warnings (treating as fatal).")
endif ()
+
+if (NOT "$ENV{CMake_SKIP_INSTALL}")
+ ctest_build(APPEND
+ TARGET install
+ RETURN_VALUE install_result)
+
+ if (install_result)
+ message(FATAL_ERROR
+ "Failed to install")
+ endif ()
+endif ()
diff --git a/.gitlab/ci/ctest_exclusions.cmake b/.gitlab/ci/ctest_exclusions.cmake
index 5bb03ca..d8980f6 100644
--- a/.gitlab/ci/ctest_exclusions.cmake
+++ b/.gitlab/ci/ctest_exclusions.cmake
@@ -1,5 +1,6 @@
set(test_exclusions
)
+
string(REPLACE ";" "|" test_exclusions "${test_exclusions}")
if (test_exclusions)
set(test_exclusions "(${test_exclusions})")
diff --git a/.gitlab/ci/docker/fedora31/install_deps.sh b/.gitlab/ci/docker/fedora31/install_deps.sh
index 7f8da57..bcb1564 100755
--- a/.gitlab/ci/docker/fedora31/install_deps.sh
+++ b/.gitlab/ci/docker/fedora31/install_deps.sh
@@ -8,7 +8,8 @@ dnf install -y \
dnf install --setopt=install_weak_deps=False -y \
clang-tools-extra \
gcc-c++ \
- git-core
+ git-core \
+ make
# Install documentation tools.
dnf install --setopt=install_weak_deps=False -y \
@@ -16,4 +17,9 @@ dnf install --setopt=install_weak_deps=False -y \
texinfo \
qt5-qttools-devel
+# Tools needed for the test suite.
+dnf install --setopt=install_weak_deps=False -y \
+ findutils \
+ file
+
dnf clean all
diff --git a/.gitlab/ci/ninja.ps1 b/.gitlab/ci/ninja.ps1
new file mode 100755
index 0000000..91f8b02
--- /dev/null
+++ b/.gitlab/ci/ninja.ps1
@@ -0,0 +1,17 @@
+$erroractionpreference = "stop"
+
+$version = "1.10.0"
+$sha256sum = "919FD158C16BF135E8A850BB4046EC1CE28A7439EE08B977CD0B7F6B3463D178"
+$filename = "ninja-win"
+$tarball = "$filename.zip"
+
+$outdir = $pwd.Path
+$outdir = "$outdir\.gitlab"
+Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
+$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
+if ($hash.Hash -ne $sha256sum) {
+ exit 1
+}
+
+Add-Type -AssemblyName System.IO.Compression.FileSystem
+[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
diff --git a/.gitlab/ci/ninja.sh b/.gitlab/ci/ninja.sh
index 31da12b..93c1ee9 100755
--- a/.gitlab/ci/ninja.sh
+++ b/.gitlab/ci/ninja.sh
@@ -3,13 +3,33 @@
set -e
readonly version="1.10.0"
-readonly sha256sum="6566836ddf3d72ca06685b34814e0c6fa0f0943542d651d0dab3150f10307c82"
-readonly filename="ninja-linux"
+
+case "$( uname -s )" in
+ Linux)
+ shatool="sha256sum"
+ sha256sum="6566836ddf3d72ca06685b34814e0c6fa0f0943542d651d0dab3150f10307c82"
+ platform="linux"
+ ;;
+ Darwin)
+ shatool="shasum -a 256"
+ sha256sum="2ee405c0e205d55666c60cc9c0d8d04c8ede06d3ef2e2c2aabe08fd81c17d22e"
+ platform="mac"
+ ;;
+ *)
+ echo "Unrecognized platform $( uname -s )"
+ exit 1
+ ;;
+esac
+readonly shatool
+readonly sha256sum
+readonly platform
+
+readonly filename="ninja-$platform"
readonly tarball="$filename.zip"
cd .gitlab
echo "$sha256sum $tarball" > ninja.sha256sum
curl -OL "https://github.com/ninja-build/ninja/releases/download/v$version/$tarball"
-sha256sum --check ninja.sha256sum
+$shatool --check ninja.sha256sum
./cmake/bin/cmake -E tar xf "$tarball"
diff --git a/.gitlab/ci/sccache.ps1 b/.gitlab/ci/sccache.ps1
new file mode 100755
index 0000000..6231c72
--- /dev/null
+++ b/.gitlab/ci/sccache.ps1
@@ -0,0 +1,22 @@
+$erroractionpreference = "stop"
+
+# 0.2.13 is unavailable right now.
+# https://github.com/mozilla/sccache/issues/677
+$version = "0.2.12"
+$sha256sum = "FD05E91C59B9497D4EBAE311B47A982F2A6EB942DCA3C9C314CC1FB36F8BC64D"
+$filename = "sccache-$version-x86_64-pc-windows-msvc"
+$tarball = "$filename.tar.gz"
+
+$outdir = $pwd.Path
+$outdir = "$outdir\.gitlab"
+Invoke-WebRequest -Uri "https://github.com/mozilla/sccache/releases/download/$version/$tarball" -OutFile "$outdir\$tarball"
+$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
+if ($hash.Hash -ne $sha256sum) {
+ exit 1
+}
+
+$curdir = $pwd.Path
+Set-Location -Path "$outdir"
+cmake -E tar xzf "$outdir\$tarball"
+Move-Item -Path "$outdir\$filename\sccache.exe" -Destination "$outdir\sccache.exe"
+Set-Location -Path "$curdir"
diff --git a/.gitlab/ci/sccache.sh b/.gitlab/ci/sccache.sh
index c88cdcc..f7d51ff 100755
--- a/.gitlab/ci/sccache.sh
+++ b/.gitlab/ci/sccache.sh
@@ -2,15 +2,35 @@
set -e
-readonly version="0.2.12"
-readonly sha256sum="26fd04c1273952cc2a0f359a71c8a1857137f0ee3634058b3f4a63b69fc8eb7f"
-readonly filename="sccache-$version-x86_64-unknown-linux-musl"
+readonly version="0.2.13"
+
+case "$( uname -s )" in
+ Linux)
+ shatool="sha256sum"
+ sha256sum="28a5499e340865b08b632306b435913beb590fbd7b49a3f887a623b459fabdeb"
+ platform="x86_64-unknown-linux-musl"
+ ;;
+ Darwin)
+ shatool="shasum -a 256"
+ sha256sum="f564e948abadfc9e409eb1cd7babf24c6784057d5506c3b0a04cdd37cd830ae9"
+ platform="x86_64-apple-darwin"
+ ;;
+ *)
+ echo "Unrecognized platform $( uname -s )"
+ exit 1
+ ;;
+esac
+readonly shatool
+readonly sha256sum
+readonly platform
+
+readonly filename="sccache-$version-$platform"
readonly tarball="$filename.tar.gz"
cd .gitlab
echo "$sha256sum $tarball" > sccache.sha256sum
curl -OL "https://github.com/mozilla/sccache/releases/download/$version/$tarball"
-sha256sum --check sccache.sha256sum
+$shatool --check sccache.sha256sum
tar xf "$tarball"
mv "$filename/sccache" .
diff --git a/.gitlab/ci/vcvarsall.ps1 b/.gitlab/ci/vcvarsall.ps1
new file mode 100755
index 0000000..a48b511
--- /dev/null
+++ b/.gitlab/ci/vcvarsall.ps1
@@ -0,0 +1,9 @@
+$erroractionpreference = "stop"
+
+cmd /c "`"$env:VCVARSALL`" $VCVARSPLATFORM & set" |
+foreach {
+ if ($_ -match "=") {
+ $v = $_.split("=")
+ [Environment]::SetEnvironmentVariable($v[0], $v[1])
+ }
+}
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index 5b78f2e..4c8267d 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -11,6 +11,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"warning: \\(Long double usage is reported only once for each file"
"warning: To disable this warning use"
"could not be inlined"
+ "libcmexpat.*has no symbols"
"libcmcurl.*has no symbols"
"not sorted slower link editing will result"
"stl_deque.h:479"
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 0c8a639..d7e567c 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -978,6 +978,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
--build-options
--test-command ${CMAKE_CMAKE_COMMAND}
"-DCPackWiXGenerator_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackWiXGenerator"
+ "-Dno_verify:BOOL=${CMake_TEST_WIX_NO_VERIFY}"
"-Dconfig=\${CTEST_CONFIGURATION_TYPE}"
-P "${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake")
diff --git a/Tests/CPackWiXGenerator/CMakeLists.txt b/Tests/CPackWiXGenerator/CMakeLists.txt
index 73eaf4f..940e849 100644
--- a/Tests/CPackWiXGenerator/CMakeLists.txt
+++ b/Tests/CPackWiXGenerator/CMakeLists.txt
@@ -49,6 +49,9 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "CPack Component Example")
set(CPACK_WIX_UPGRADE_GUID "BF20CE5E-7F7C-401D-8F7C-AB45E8D170E6")
set(CPACK_WIX_UNINSTALL "1")
+# Support non-interactive sessions (like CI).
+set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-sval")
+
set(CPACK_PACKAGE_EXECUTABLES
"my-libapp" "CPack WiX Test"
"my-other-app" "Second CPack WiX Test"
diff --git a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake
index ca9fd90..c549e61 100644
--- a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake
+++ b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake
@@ -74,4 +74,6 @@ endforeach()
# error SMOK1076 : ICE61: This product should remove only older
# versions of itself. The Maximum version is not less
# than the current product. (1.0.0 1.0.0)
-run_wix_command(smoke -nologo -wx -sw1076 "${installer_file}")
+if (NOT no_verify)
+ run_wix_command(smoke -nologo -wx -sw1076 "${installer_file}")
+endif ()
diff --git a/Tests/RunCMake/export/DependOnDoubleExport-stderr.txt b/Tests/RunCMake/export/DependOnDoubleExport-stderr.txt
index b78c7e4..e8f8a09 100644
--- a/Tests/RunCMake/export/DependOnDoubleExport-stderr.txt
+++ b/Tests/RunCMake/export/DependOnDoubleExport-stderr.txt
@@ -3,8 +3,7 @@ CMake Error in CMakeLists.txt:
that is not in this export set, but in multiple other export sets:
.*/Tests/RunCMake/export/DependOnDoubleExport-build/exportset.cmake,
.*/Tests/RunCMake/export/DependOnDoubleExport-build/manual.cmake.
-
-
++
An exported target cannot depend upon another target which is exported
multiple times. Consider consolidating the exports of the "doubleexported"
target to a single export.