Merge topic 'fphsa-version-message' 2fc22a3dec FPHSA: Fix empty version message in exact match Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9227
diff --git a/CMakeLists.txt b/CMakeLists.txt index dfbb38d..5f661a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -1,7 +1,7 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -cmake_minimum_required(VERSION 3.13...3.27 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13...3.28 FATAL_ERROR) set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake) set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst new file mode 100644 index 0000000..e4cc01e --- /dev/null +++ b/Help/release/dev/0-sample-topic.rst
@@ -0,0 +1,7 @@ +0-sample-topic +-------------- + +* This is a sample release note for the change in a topic. + Developers should add similar notes for each topic branch + making a noteworthy change. Each document should be named + and titled to match the topic name to avoid merge conflicts.
diff --git a/Help/release/index.rst b/Help/release/index.rst index 76adcac..a809467 100644 --- a/Help/release/index.rst +++ b/Help/release/index.rst
@@ -7,6 +7,8 @@ This file should include the adjacent "dev.txt" file in development versions but not in release versions. +.. include:: dev.txt + Releases ========
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index b380aa5..25aacca 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -1182,7 +1182,7 @@ ENCODING AUTO # cl prints in console output code page ) string(REPLACE "\n" "\n " msg " ${out}") - if(res EQUAL 0 AND "${out}" MATCHES "(^|\n)([^:\n][^:\n]+:[^:\n]*[^: \n][^: \n]:?[ \t]+)([A-Za-z]:\\\\|\\./|/)") + if(res EQUAL 0 AND "${out}" MATCHES "(^|\n)([^:\n][^:\n]+:[^:\n]*[^: \n][^: \n]:?[ \t]+)([A-Za-z]:\\\\|\\./|\\.\\\\|/)") set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_MATCH_2}" PARENT_SCOPE) string(APPEND msg "\nFound prefix \"${CMAKE_MATCH_2}\"") else()
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 608b2ed..6c80506 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake
@@ -485,18 +485,7 @@ foreach(_match IN LISTS _versions_regex) if(_match MATCHES "([0-9]+(\\.[0-9]+)+)") - cmake_host_system_information(RESULT _reg - QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Mathworks/${_installation_type}/${CMAKE_MATCH_1}" - VALUE "MATLABROOT" - VIEW ${_view} - ) - - _Matlab_VersionInfoXML("${_reg}" _matlab_version_tmp) - if("${_matlab_version_tmp}" STREQUAL "unknown") - list(APPEND matlabs_from_registry ${_match}) - else() - list(APPEND matlabs_from_registry ${_matlab_version_tmp}) - endif() + list(APPEND matlabs_from_registry ${_match}) endif() endforeach()
diff --git a/Modules/FindVulkan.cmake b/Modules/FindVulkan.cmake index 581763d..0f45b63 100644 --- a/Modules/FindVulkan.cmake +++ b/Modules/FindVulkan.cmake
@@ -537,13 +537,7 @@ _Vulkan_set_library_component_found(glslang-osdependent NO_WARNING) _Vulkan_set_library_component_found(glslang-machineindependent NO_WARNING) _Vulkan_set_library_component_found(glslang-genericcodegen NO_WARNING) -_Vulkan_set_library_component_found(glslang - DEPENDENT_COMPONENTS - glslang-spirv - glslang-oglcompiler - glslang-osdependent - glslang-machineindependent - glslang-genericcodegen) +_Vulkan_set_library_component_found(glslang DEPENDENT_COMPONENTS glslang-spirv) _Vulkan_set_library_component_found(shaderc_combined) _Vulkan_set_library_component_found(SPIRV-Tools) _Vulkan_set_library_component_found(volk) @@ -747,10 +741,6 @@ if((Vulkan_glslang_LIBRARY OR Vulkan_glslang_DEBUG_LIBRARY) AND TARGET Vulkan::glslang-spirv - AND TARGET Vulkan::glslang-oglcompiler - AND TARGET Vulkan::glslang-osdependent - AND TARGET Vulkan::glslang-machineindependent - AND TARGET Vulkan::glslang-genericcodegen AND NOT TARGET Vulkan::glslang) add_library(Vulkan::glslang STATIC IMPORTED) set_property(TARGET Vulkan::glslang @@ -775,10 +765,13 @@ target_link_libraries(Vulkan::glslang INTERFACE Vulkan::glslang-spirv - Vulkan::glslang-oglcompiler - Vulkan::glslang-osdependent - Vulkan::glslang-machineindependent - Vulkan::glslang-genericcodegen + # OGLCompiler library has been fully removed since version 14.0.0 + # OSDependent, MachineIndependent, and GenericCodeGen may also be removed in the future. + # See https://github.com/KhronosGroup/glslang/issues/3462 + $<TARGET_NAME_IF_EXISTS:Vulkan::glslang-oglcompiler> + $<TARGET_NAME_IF_EXISTS:Vulkan::glslang-osdependent> + $<TARGET_NAME_IF_EXISTS:Vulkan::glslang-machineindependent> + $<TARGET_NAME_IF_EXISTS:Vulkan::glslang-genericcodegen> ) endif()
diff --git a/Modules/UseJava/javaTargets.cmake.in b/Modules/UseJava/javaTargets.cmake.in index f3670c2..dc20c82 100644 --- a/Modules/UseJava/javaTargets.cmake.in +++ b/Modules/UseJava/javaTargets.cmake.in
@@ -1,5 +1,5 @@ cmake_policy(PUSH) -cmake_policy(VERSION 2.8.12...3.27) +cmake_policy(VERSION 2.8.12...3.28) #---------------------------------------------------------------- # Generated CMake Java target import file.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 67788a8..b9e8827 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake
@@ -1,8 +1,8 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 29) -set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_RC 0) +set(CMake_VERSION_PATCH 20240208) +#set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) # Start with the full version number used in tags. It has no dev info.
diff --git a/Source/Checks/Curses/CMakeLists.txt b/Source/Checks/Curses/CMakeLists.txt index 6f5f145..5d0e240 100644 --- a/Source/Checks/Curses/CMakeLists.txt +++ b/Source/Checks/Curses/CMakeLists.txt
@@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13...3.27 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13...3.28 FATAL_ERROR) project(CheckCurses C) set(CURSES_NEED_NCURSES TRUE)
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index f332007..2e83951 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx
@@ -985,8 +985,9 @@ /* clang-format on */ // Isolate the file policy level. - // Support CMake versions as far back as 2.6 but also support using NEW - // policy settings for up to CMake 3.27 (this upper limit may be reviewed + // Support CMake versions as far back as the + // RequiredCMakeVersion{Major,Minor,Patch}, but also support using NEW + // policy settings for up to CMake 3.28 (this upper limit may be reviewed // and increased from time to time). This reduces the opportunity for CMake // warnings when an older export file is later used with newer CMake // versions. @@ -995,7 +996,7 @@ << "cmake_policy(VERSION " << this->RequiredCMakeVersionMajor << '.' << this->RequiredCMakeVersionMinor << '.' - << this->RequiredCMakeVersionPatch << "...3.27)\n"; + << this->RequiredCMakeVersionPatch << "...3.28)\n"; /* clang-format on */ }
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 509f28b..cfaac11 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx
@@ -4657,13 +4657,14 @@ } // Deprecate old policies. - if (status == cmPolicies::OLD && id <= cmPolicies::CMP0126 && + if (status == cmPolicies::OLD && id <= cmPolicies::CMP0128 && !(this->GetCMakeInstance()->GetIsInTryCompile() && ( // Policies set by cmCoreTryCompile::TryCompileCode. id == cmPolicies::CMP0065 || id == cmPolicies::CMP0083 || id == cmPolicies::CMP0091 || id == cmPolicies::CMP0104 || - id == cmPolicies::CMP0123 || id == cmPolicies::CMP0126)) && + id == cmPolicies::CMP0123 || id == cmPolicies::CMP0126 || + id == cmPolicies::CMP0128)) && (!this->IsSet("CMAKE_WARN_DEPRECATED") || this->IsOn("CMAKE_WARN_DEPRECATED"))) { this->IssueMessage(MessageType::DEPRECATION_WARNING,
diff --git a/Tests/FindVulkan/CMakeLists.txt b/Tests/FindVulkan/CMakeLists.txt index 46ce1c6..d7c99ce 100644 --- a/Tests/FindVulkan/CMakeLists.txt +++ b/Tests/FindVulkan/CMakeLists.txt
@@ -5,6 +5,7 @@ "${CMake_BINARY_DIR}/Tests/FindVulkan/Test" ${build_generator_args} --build-project TestFindVulkan - --build-options ${build_options} + # Use --fresh to make testing multiple SDK versions on the same computer easier + --build-options ${build_options} --fresh --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> )
diff --git a/Tests/FindVulkan/Test/Run-glslangValidator.cmake b/Tests/FindVulkan/Test/Run-glslangValidator.cmake index 27fd950..fd7867f 100644 --- a/Tests/FindVulkan/Test/Run-glslangValidator.cmake +++ b/Tests/FindVulkan/Test/Run-glslangValidator.cmake
@@ -11,8 +11,10 @@ message(SEND_ERROR "Result of ${exe_display} --help is ${result}, should be 1") endif() - if(NOT output MATCHES "^Usage: glslangValidator") - message(SEND_ERROR "Output of ${exe_display} --help is \"${output}\", should begin with \"Usage: glslangValidator\"") + # NOTE: Newer version prefer just "glslang" since it's no longer really just a validator. + # This approach is still compatible with older version that output glslangValidator + if(NOT output MATCHES "^Usage: glslang") + message(SEND_ERROR "Output of ${exe_display} --help is \"${output}\", should begin with \"Usage: glslang\"") endif() endfunction()
diff --git a/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stderr.txt b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stderr.txt new file mode 100644 index 0000000..1953091 --- /dev/null +++ b/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD-stderr.txt
@@ -0,0 +1,9 @@ +^CMake Deprecation Warning at [^ +]*/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-OLD\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0127 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\.$
diff --git a/Tests/RunCMake/CompileFeatures/CMP0128WarnMatch-stderr.txt b/Tests/RunCMake/CompileFeatures/CMP0128WarnMatch-stderr.txt index 320c2ba..4b3774f 100644 --- a/Tests/RunCMake/CompileFeatures/CMP0128WarnMatch-stderr.txt +++ b/Tests/RunCMake/CompileFeatures/CMP0128WarnMatch-stderr.txt
@@ -1,3 +1,14 @@ +^CMake Deprecation Warning at CMP0128WarnMatch-(C|CXX)\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0128 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0128 is not set: Selection of language standard and extension flags improved\. Run "cmake --help-policy CMP0128" for policy details\. Use
diff --git a/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt b/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt index 068cba9..37a0767 100644 --- a/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt +++ b/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt
@@ -1,3 +1,14 @@ +^CMake Deprecation Warning at CMP0128WarnUnset-(C|CXX)\.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0128 will be removed from a future version + of CMake\. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances\. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) ++ CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0128 is not set: Selection of language standard and extension flags improved\. Run "cmake --help-policy CMP0128" for policy details\. Use
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index f020f0d..8b24c16 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -46,7 +46,8 @@ if(RunCMake_MAKE_PROGRAM) set(maybe_MAKE_PROGRAM "-DRunCMake_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}") endif() - run_cmake_script(ShowIncludes-437-ClangCl -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) + run_cmake_script(ShowIncludes-437-ClangCl-17 -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) + run_cmake_script(ShowIncludes-437-ClangCl-18 -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) run_cmake_script(ShowIncludes-437-English -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) run_cmake_script(ShowIncludes-437-French -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) run_cmake_script(ShowIncludes-437-German -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-check.cmake similarity index 64% rename from Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake rename to Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-check.cmake index 6136463..3ebdb4f 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake +++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-check.cmake
@@ -1,3 +1,3 @@ -# 'clang-cl /showIncludes' prefix. +# 'clang-cl /showIncludes' prefix for clang-cl <= 17. set(expect "Note: including file: ") include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-stdout.txt similarity index 100% rename from Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt rename to Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-stdout.txt
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17.cmake new file mode 100644 index 0000000..9642f06 --- /dev/null +++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17.cmake
@@ -0,0 +1,3 @@ +set(CODEPAGE 437) +set(VSLANG "clang-cl-17") # Special case for test, not a real VS value. +include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-check.cmake similarity index 64% copy from Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake copy to Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-check.cmake index 6136463..a42af86 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake +++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-check.cmake
@@ -1,3 +1,3 @@ -# 'clang-cl /showIncludes' prefix. +# 'clang-cl /showIncludes' prefix for clang-cl >= 18. set(expect "Note: including file: ") include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-stdout.txt similarity index 100% copy from Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt copy to Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-stdout.txt
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18.cmake new file mode 100644 index 0000000..997ffb9 --- /dev/null +++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18.cmake
@@ -0,0 +1,3 @@ +set(CODEPAGE 437) +set(VSLANG "clang-cl-18") # Special case for test, not a real VS value. +include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake deleted file mode 100644 index 7eca3d3..0000000 --- a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake +++ /dev/null
@@ -1,3 +0,0 @@ -set(CODEPAGE 437) -set(VSLANG "clang-cl") # Special case for test, not a real VS value. -include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/showIncludes.c b/Tests/RunCMake/showIncludes.c index 5114965..3859049 100644 --- a/Tests/RunCMake/showIncludes.c +++ b/Tests/RunCMake/showIncludes.c
@@ -28,14 +28,22 @@ printf("OEM code page: %u\n", GetOEMCP()); printf("VSLANG: %s\n", vslang); - // clang-cl (special case for test, not a real VS value). - if (strcmp(vslang, "clang-cl") == 0) { + // clang-cl <= 17 (special case for test, not a real VS value). + if (strcmp(vslang, "clang-cl-17") == 0) { if (cp == 437 || cp == 65001) { printf("Note: including file: ./foo.h\n"); return 0; } } + // clang-cl >= 18 (special case for test, not a real VS value). + if (strcmp(vslang, "clang-cl-18") == 0) { + if (cp == 437 || cp == 65001) { + printf("Note: including file: .\\\\foo.h\n"); + return 0; + } + } + // msvc-wine (special case for test, not a real VS value). if (strcmp(vslang, "msvc-wine") == 0) { if (cp == 437 || cp == 65001) {
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index 52a31eb..8bf591b 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt
@@ -3,7 +3,7 @@ if(NOT CMake_SOURCE_DIR) set(CMakeDeveloperReference_STANDALONE 1) - cmake_minimum_required(VERSION 3.13...3.27 FATAL_ERROR) + cmake_minimum_required(VERSION 3.13...3.28 FATAL_ERROR) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index 4ffcdd7..746c872 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt
@@ -3,7 +3,7 @@ if(NOT CMake_SOURCE_DIR) set(CMakeHelp_STANDALONE 1) - cmake_minimum_required(VERSION 3.13...3.27 FATAL_ERROR) + cmake_minimum_required(VERSION 3.13...3.28 FATAL_ERROR) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)