diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-05-08 14:15:27 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-05-22 15:34:14 (GMT) |
commit | a1b1fc611bc8aeb519b79b3e1b86ce4e4dbc55e9 (patch) | |
tree | c2820dc710396a9de6b6758a9ce7d182184d7016 /.gitlab | |
parent | 3e1a1ba92d0e64324916f65214b633bc067997bf (diff) | |
download | CMake-a1b1fc611bc8aeb519b79b3e1b86ce4e4dbc55e9.zip CMake-a1b1fc611bc8aeb519b79b3e1b86ce4e4dbc55e9.tar.gz CMake-a1b1fc611bc8aeb519b79b3e1b86ce4e4dbc55e9.tar.bz2 |
gitlab-ci: add Linux makefiles and ninja builders
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/configure_common.cmake | 6 | ||||
-rw-r--r-- | .gitlab/ci/configure_fedora31_makefiles.cmake | 1 | ||||
-rw-r--r-- | .gitlab/ci/configure_fedora31_ninja.cmake | 1 | ||||
-rw-r--r-- | .gitlab/ci/ctest_build.cmake | 11 | ||||
-rw-r--r-- | .gitlab/ci/ctest_exclusions.cmake | 1 |
5 files changed, 20 insertions, 0 deletions
diff --git a/.gitlab/ci/configure_common.cmake b/.gitlab/ci/configure_common.cmake index fc2aaae..165ae55 100644 --- a/.gitlab/ci/configure_common.cmake +++ b/.gitlab/ci/configure_common.cmake @@ -1,3 +1,9 @@ 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 "") + 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/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})") |