diff options
-rw-r--r-- | .gitlab-ci.yml | 8 | ||||
-rw-r--r-- | .gitlab/artifacts.yml | 11 | ||||
-rwxr-xr-x | .gitlab/ci/cmake.ps1 | 6 | ||||
-rwxr-xr-x | .gitlab/ci/cmake.sh | 12 | ||||
-rw-r--r-- | .gitlab/ci/ctest_test.cmake | 1 | ||||
-rw-r--r-- | .gitlab/ci/ctest_test_external.cmake | 1 | ||||
-rw-r--r-- | Help/prop_tgt/C_STANDARD.rst | 21 | ||||
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 3 | ||||
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 3 | ||||
-rw-r--r-- | Source/cmDependsCompiler.cxx | 4 | ||||
-rw-r--r-- | Source/cmGccDepfileReader.cxx | 8 | ||||
-rw-r--r-- | Source/cmGccDepfileReader.h | 11 |
12 files changed, 71 insertions, 18 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d224088..642f904 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -163,6 +163,7 @@ test:debian10-ninja: - .debian10_ninja - .cmake_test_linux_release - .linux_builder_tags_qt + - .cmake_junit_artifacts - .run_dependent - .needs_centos6_x86_64 @@ -171,6 +172,7 @@ test:debian10-aarch64-ninja: - .debian10_aarch64_ninja - .cmake_test_linux_release - .linux_builder_tags_aarch64_qt + - .cmake_junit_artifacts - .run_dependent - .needs_centos7_aarch64 variables: @@ -209,6 +211,7 @@ test:fedora34-makefiles-nospace: - .fedora34_makefiles - .cmake_test_linux_release - .linux_builder_tags_qt + - .cmake_junit_artifacts - .run_dependent - .needs_centos6_x86_64 variables: @@ -221,6 +224,7 @@ test:cuda10.2-nvidia: - .cuda10.2_nvidia - .cmake_test_linux_release - .linux_builder_tags_cuda + - .cmake_junit_artifacts - .run_dependent - .needs_centos6_x86_64 @@ -259,6 +263,7 @@ test:fedora34-ninja-multi: - .fedora34_ninja_multi - .cmake_test_linux_external - .linux_builder_tags_qt + - .cmake_junit_artifacts - .run_dependent dependencies: - test:fedora34-ninja @@ -625,6 +630,7 @@ test:macos-x86_64-xcode: - .macos_x86_64_xcode - .cmake_test_macos_external - .macos_x86_64_builder_ext_tags + - .cmake_junit_artifacts - .run_dependent dependencies: - test:macos-x86_64-ninja @@ -636,6 +642,7 @@ test:macos-arm64-xcode: - .macos_arm64_xcode - .cmake_test_macos_external - .macos_arm64_builder_ext_tags + - .cmake_junit_artifacts - .run_dependent dependencies: - test:macos-arm64-ninja @@ -717,6 +724,7 @@ test:windows-vs2019-x64: - .windows_vs2019_x64 - .cmake_test_windows_external - .windows_builder_ext_tags + - .cmake_junit_artifacts - .run_dependent dependencies: - test:windows-vs2019-x64-ninja diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml index edd313f..45e4c5b 100644 --- a/.gitlab/artifacts.yml +++ b/.gitlab/artifacts.yml @@ -82,11 +82,22 @@ - build/cmake-*.tar.gz - build/cmake-*.zip +.cmake_junit_artifacts: + artifacts: + expire_in: 1d + when: always + reports: + junit: + - build/junit.xml + .cmake_test_artifacts: artifacts: expire_in: 1d # External testing can be useful even if test jobs fail. when: always + reports: + junit: + - build/junit.xml paths: # Take the install tree. - build/install/ diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1 index 3d6fb81..a16fe45 100755 --- a/.gitlab/ci/cmake.ps1 +++ b/.gitlab/ci/cmake.ps1 @@ -1,8 +1,8 @@ $erroractionpreference = "stop" -$version = "3.19.7" -$sha256sum = "E6788D6E23B3026C37FCFA7658075D6B5F9113F26FAE17FE372AD4A7EE62D5FD" -$filename = "cmake-$version-win64-x64" +$version = "3.21.0-rc2" +$sha256sum = "AF88454243BCBAF9F537458562D669DAF0DBEDA8C0FD82C1D93BC2B4285AE4C7" +$filename = "cmake-$version-windows-x86_64" $tarball = "$filename.zip" $outdir = $pwd.Path diff --git a/.gitlab/ci/cmake.sh b/.gitlab/ci/cmake.sh index e02eb8a..ff59d28 100755 --- a/.gitlab/ci/cmake.sh +++ b/.gitlab/ci/cmake.sh @@ -2,22 +2,22 @@ set -e -readonly version="3.19.3" +readonly version="3.21.0-rc2" case "$(uname -s)-$(uname -m)" in Linux-x86_64) shatool="sha256sum" - sha256sum="c18b65697e9679e5c88dccede08c323cd3d3730648e59048047bba82097e0ffc" - platform="Linux-x86_64" + sha256sum="31d4f5f4bb8793127eb441c8311fd4baad4d2a86c26fd37b43d4ef23887c332e" + platform="linux-x86_64" ;; Linux-aarch64) shatool="sha256sum" - sha256sum="66e507c97ffb586d7ca6567890808b792c8eb004b645706df6fbf27826a395a2" - platform="Linux-aarch64" + sha256sum="437565f32e3f28fd8322f96a5472b196825eaf5ef6139e1c383afe624decc476" + platform="linux-aarch64" ;; Darwin-*) shatool="shasum -a 256" - sha256sum="a6b79ad05f89241a05797510e650354d74ff72cc988981cdd1eb2b3b2bda66ac" + sha256sum="5ab0ee4edb45de33080f571cf69300b2abd92dc02a9c624b3c289a4a14cab160" platform="macos-universal" ;; *) diff --git a/.gitlab/ci/ctest_test.cmake b/.gitlab/ci/ctest_test.cmake index facf9ba..b02d032 100644 --- a/.gitlab/ci/ctest_test.cmake +++ b/.gitlab/ci/ctest_test.cmake @@ -20,6 +20,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake") ctest_test( PARALLEL_LEVEL "${nproc}" TEST_LOAD "${nproc}" + OUTPUT_JUNIT "${CTEST_BINARY_DIRECTORY}/junit.xml" RETURN_VALUE test_result EXCLUDE "${test_exclusions}") ctest_submit(PARTS Test) diff --git a/.gitlab/ci/ctest_test_external.cmake b/.gitlab/ci/ctest_test_external.cmake index 6576c26..48e910b 100644 --- a/.gitlab/ci/ctest_test_external.cmake +++ b/.gitlab/ci/ctest_test_external.cmake @@ -74,6 +74,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake") ctest_test( PARALLEL_LEVEL "${nproc}" TEST_LOAD "${nproc}" + OUTPUT_JUNIT "${CTEST_BINARY_DIRECTORY}/junit.xml" RETURN_VALUE test_result ${ctest_label_args} EXCLUDE "${test_exclusions}") diff --git a/Help/prop_tgt/C_STANDARD.rst b/Help/prop_tgt/C_STANDARD.rst index e22b775..ecba2a8 100644 --- a/Help/prop_tgt/C_STANDARD.rst +++ b/Help/prop_tgt/C_STANDARD.rst @@ -11,7 +11,26 @@ flag such as ``-std=gnu11`` to the compile line. For compilers that have no notion of a C standard level, such as Microsoft Visual C++ before VS 16.7, this property has no effect. -Supported values are ``90``, ``99``, ``11``, ``17``, ``23``. +Supported values are: + +``90`` + C89/C90 + +``99`` + C99 + +``11`` + C11 + +``17`` + .. versionadded:: 3.21 + + C17 + +``23`` + .. versionadded:: 3.21 + + C23 If the value requested does not result in a compile flag being added for the compiler in use, a previous standard flag will be added instead. This diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index ca497f1..0f80f9c 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -88,7 +88,8 @@ else() # MSVC needs at least one include directory for __has_include to function, # but custom toolchains may run MSVC with no INCLUDE env var and no -I flags. - "-I__does_not_exist__" + # Also avoid linking so this works with no LIB env var. + "-c -I__does_not_exist__" ) endif() if(CMAKE_C_COMPILER_TARGET) diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index e297f90..556518f 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -83,7 +83,8 @@ else() # MSVC needs at least one include directory for __has_include to function, # but custom toolchains may run MSVC with no INCLUDE env var and no -I flags. - "-I__does_not_exist__" + # Also avoid linking so this works with no LIB env var. + "-c -I__does_not_exist__" ) endif() diff --git a/Source/cmDependsCompiler.cxx b/Source/cmDependsCompiler.cxx index 800725f..bf599ff 100644 --- a/Source/cmDependsCompiler.cxx +++ b/Source/cmDependsCompiler.cxx @@ -131,7 +131,9 @@ bool cmDependsCompiler::CheckDependencies( depends.emplace_back(std::move(line)); } } else if (format == "gcc"_s) { - auto deps = cmReadGccDepfile(depFile.c_str()); + auto deps = cmReadGccDepfile( + depFile.c_str(), this->LocalGenerator->GetCurrentBinaryDirectory(), + GccDepfilePrependPaths::Deps); if (!deps) { continue; } diff --git a/Source/cmGccDepfileReader.cxx b/Source/cmGccDepfileReader.cxx index 6436baa..d30dbc3 100644 --- a/Source/cmGccDepfileReader.cxx +++ b/Source/cmGccDepfileReader.cxx @@ -12,8 +12,9 @@ #include "cmStringAlgorithms.h" #include "cmSystemTools.h" -cm::optional<cmGccDepfileContent> cmReadGccDepfile(const char* filePath, - const std::string& prefix) +cm::optional<cmGccDepfileContent> cmReadGccDepfile( + const char* filePath, const std::string& prefix, + GccDepfilePrependPaths prependPaths) { cmGccDepfileLexerHelper helper; if (!helper.readFile(filePath)) { @@ -23,7 +24,8 @@ cm::optional<cmGccDepfileContent> cmReadGccDepfile(const char* filePath, for (auto& dep : *deps) { for (auto& rule : dep.rules) { - if (!prefix.empty() && !cmSystemTools::FileIsFullPath(rule)) { + if (prependPaths == GccDepfilePrependPaths::All && !prefix.empty() && + !cmSystemTools::FileIsFullPath(rule)) { rule = cmStrCat(prefix, '/', rule); } if (cmSystemTools::FileIsFullPath(rule)) { diff --git a/Source/cmGccDepfileReader.h b/Source/cmGccDepfileReader.h index c8a3748..2433492 100644 --- a/Source/cmGccDepfileReader.h +++ b/Source/cmGccDepfileReader.h @@ -8,8 +8,15 @@ #include "cmGccDepfileReaderTypes.h" +enum class GccDepfilePrependPaths +{ + All, + Deps, +}; + /* - * Read dependencies file and append prefix to all relative paths + * Read dependencies file and prepend prefix to all relative paths */ cm::optional<cmGccDepfileContent> cmReadGccDepfile( - const char* filePath, const std::string& prefix = {}); + const char* filePath, const std::string& prefix = {}, + GccDepfilePrependPaths prependPaths = GccDepfilePrependPaths::All); |