summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml6
-rwxr-xr-x.gitlab/ci/ninja-nightly.sh11
-rwxr-xr-x.gitlab/ci/ninja.sh4
-rw-r--r--.gitlab/os-linux.yml3
-rw-r--r--.gitlab/os-macos.yml3
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake13
-rw-r--r--Modules/Compiler/NVHPC-C.cmake11
-rw-r--r--Modules/Compiler/NVHPC-CXX.cmake10
-rw-r--r--Modules/Compiler/NVHPC.cmake12
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Tests/RunCMake/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake4
12 files changed, 60 insertions, 21 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a964b46..3343918 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -166,6 +166,8 @@ test:debian10-ninja:
- .cmake_junit_artifacts
- .run_dependent
- .needs_centos6_x86_64
+ variables:
+ CMAKE_CI_JOB_NIGHTLY_NINJA: "true"
test:debian10-aarch64-ninja:
extends:
@@ -572,7 +574,7 @@ test:fedora34-asan:
- .fedora34_asan
- .cmake_memcheck_linux
- .linux_builder_tags_qt
- - .run_automatically
+ - .run_dependent
dependencies:
- build:fedora34-asan
needs:
@@ -611,6 +613,8 @@ test:macos-x86_64-ninja:
- build:macos-x86_64-ninja
needs:
- build:macos-x86_64-ninja
+ variables:
+ CMAKE_CI_JOB_NIGHTLY_NINJA: "true"
test:macos-arm64-ninja:
extends:
diff --git a/.gitlab/ci/ninja-nightly.sh b/.gitlab/ci/ninja-nightly.sh
new file mode 100755
index 0000000..b78b64e
--- /dev/null
+++ b/.gitlab/ci/ninja-nightly.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+cd .gitlab
+
+git clone https://github.com/ninja-build/ninja.git ninja-src
+cmake -S ninja-src -B ninja-src/build -DCMAKE_BUILD_TYPE=Release
+cmake --build ninja-src/build --parallel --target ninja
+mv ninja-src/build/ninja .
+rm -rf ninja-src
diff --git a/.gitlab/ci/ninja.sh b/.gitlab/ci/ninja.sh
index 8ead670..866d1d5 100755
--- a/.gitlab/ci/ninja.sh
+++ b/.gitlab/ci/ninja.sh
@@ -2,6 +2,10 @@
set -e
+if test "$CMAKE_CI_JOB_NIGHTLY_NINJA" = "true" -a "$CMAKE_CI_NIGHTLY" = "true"; then
+ exec .gitlab/ci/ninja-nightly.sh
+fi
+
readonly version="1.10.2"
baseurl="https://github.com/ninja-build/ninja/releases/download/v$version"
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index de370db..7fce177 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -321,8 +321,9 @@
.before_script_linux: &before_script_linux
- source .gitlab/ci/env.sh
- .gitlab/ci/cmake.sh
+ - export PATH=$PWD/.gitlab/cmake/bin:$PATH
- .gitlab/ci/ninja.sh
- - export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
+ - export PATH=$PWD/.gitlab:$PATH
- cmake --version
- ninja --version
diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml
index b79d46d..3ffd9d7 100644
--- a/.gitlab/os-macos.yml
+++ b/.gitlab/os-macos.yml
@@ -127,8 +127,9 @@
.before_script_macos: &before_script_macos
- .gitlab/ci/cmake.sh
+ - export PATH=$PWD/.gitlab/cmake/bin:$PATH
- .gitlab/ci/ninja.sh
- - export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
+ - export PATH=$PWD/.gitlab:$PATH
- cmake --version
- ninja --version
# Download Qt
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index b38de8a..fa283fe 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -539,7 +539,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
else()
set(id_toolset "")
endif()
- if("${lang}" STREQUAL "Swift")
+ set(id_lang_version "")
+ if("x${lang}" STREQUAL "xSwift")
if(CMAKE_Swift_LANGUAGE_VERSION)
set(id_lang_version "SWIFT_VERSION = ${CMAKE_Swift_LANGUAGE_VERSION};")
elseif(XCODE_VERSION VERSION_GREATER_EQUAL 10.2)
@@ -549,8 +550,14 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
else()
set(id_lang_version "SWIFT_VERSION = 2.3;")
endif()
- else()
- set(id_lang_version "")
+ elseif("x${lang}" STREQUAL "xC" OR "x${lang}" STREQUAL "xOBJC")
+ if(CMAKE_${lang}_COMPILER_ID_FLAGS MATCHES "(^| )(-std=[^ ]+)( |$)")
+ set(id_lang_version "OTHER_CFLAGS = \"${CMAKE_MATCH_2}\";")
+ endif()
+ elseif("x${lang}" STREQUAL "xCXX" OR "x${lang}" STREQUAL "xOBJCXX")
+ if(CMAKE_${lang}_COMPILER_ID_FLAGS MATCHES "(^| )(-std=[^ ]+)( |$)")
+ set(id_lang_version "OTHER_CPLUSPLUSFLAGS = \"${CMAKE_MATCH_2}\";")
+ endif()
endif()
if(CMAKE_OSX_DEPLOYMENT_TARGET)
set(id_deployment_target
diff --git a/Modules/Compiler/NVHPC-C.cmake b/Modules/Compiler/NVHPC-C.cmake
index e37aad5..9295abd 100644
--- a/Modules/Compiler/NVHPC-C.cmake
+++ b/Modules/Compiler/NVHPC-C.cmake
@@ -9,4 +9,15 @@ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 20.11)
set(CMAKE_C17_EXTENSION_COMPILE_OPTION -std=gnu17)
endif()
+if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 21.07)
+ set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
+ set(CMAKE_C_DEPFILE_FORMAT gcc)
+ set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
+else()
+ # Before NVHPC 21.07 the `-MD` flag implicitly
+ # implies `-E` and therefore compilation and dependency generation
+ # can't occur in the same invocation
+ set(CMAKE_C_DEPENDS_EXTRA_COMMANDS "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -x c -M <SOURCE> -MT <OBJECT> -MD<DEP_FILE>")
+endif()
+
__compiler_nvhpc(C)
diff --git a/Modules/Compiler/NVHPC-CXX.cmake b/Modules/Compiler/NVHPC-CXX.cmake
index 534e822..59ba7bf 100644
--- a/Modules/Compiler/NVHPC-CXX.cmake
+++ b/Modules/Compiler/NVHPC-CXX.cmake
@@ -9,4 +9,14 @@ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 20.11)
set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION -std=gnu++20)
endif()
+if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 21.07)
+ set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
+ set(CMAKE_CXX_DEPFILE_FORMAT gcc)
+ set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE)
+else()
+ # Before NVHPC 21.07 the `-MD` flag implicitly
+ # implies `-E` and therefore compilation and dependency generation
+ # can't occur in the same invocation
+ set(CMAKE_CXX_DEPENDS_EXTRA_COMMANDS "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -x c++ -M <SOURCE> -MT <OBJECT> -MD<DEP_FILE>")
+endif()
__compiler_nvhpc(CXX)
diff --git a/Modules/Compiler/NVHPC.cmake b/Modules/Compiler/NVHPC.cmake
index a85df71..7048670 100644
--- a/Modules/Compiler/NVHPC.cmake
+++ b/Modules/Compiler/NVHPC.cmake
@@ -12,16 +12,4 @@ include(Compiler/PGI)
macro(__compiler_nvhpc lang)
# Logic specific to NVHPC.
-
- if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 21.07)
- set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
- set(CMAKE_${lang}_DEPFILE_FORMAT gcc)
- set(CMAKE_${lang}_DEPENDS_USE_COMPILER TRUE)
- else()
- # Before NVHPC 21.07 the `-MD` flag implicitly
- # implies `-E` and therefore compilation and dependency generation
- # can't occur in the same invocation
- set(CMAKE_${lang}_DEPENDS_EXTRA_COMMANDS "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> ${CMAKE_${lang}_COMPILE_OPTIONS_EXPLICIT_LANGUAGE} -M <SOURCE> -MT <OBJECT> -MD<DEP_FILE>")
- endif()
-
endmacro()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index cff4806..998a351 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 21)
-set(CMake_VERSION_PATCH 20211006)
+set(CMake_VERSION_PATCH 20211007)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index b7d38fb..e24ef58 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -419,7 +419,7 @@ add_RunCMake_test(ctest_update)
add_RunCMake_test(ctest_upload)
add_RunCMake_test(ctest_environment)
add_RunCMake_test(ctest_fixtures)
-add_RunCMake_test(file -DMSYS=${MSYS})
+add_RunCMake_test(file -DCYGWIN=${CYGWIN} -DMSYS=${MSYS})
add_RunCMake_test(file-CHMOD -DMSYS=${MSYS})
add_RunCMake_test(file-RPATH -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
add_RunCMake_test(find_file)
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 9efd3f4..aff4735 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -97,7 +97,9 @@ if(NOT WIN32
run_cmake(READ_SYMLINK)
run_cmake(READ_SYMLINK-noexist)
run_cmake(READ_SYMLINK-notsymlink)
- run_cmake(INSTALL-FOLLOW_SYMLINK_CHAIN)
+ if(NOT CYGWIN)
+ run_cmake(INSTALL-FOLLOW_SYMLINK_CHAIN)
+ endif()
endif()
run_cmake(REAL_PATH-unexpected-arg)