Merge topic 'tutorial_step3_update'

8c3aa7def7 Tutorial: Update step 3 style

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7594
diff --git a/.gitlab/ci/docker/fedora36/Dockerfile b/.gitlab/ci/docker/fedora36/Dockerfile
index 26f8e3e..299d48a 100644
--- a/.gitlab/ci/docker/fedora36/Dockerfile
+++ b/.gitlab/ci/docker/fedora36/Dockerfile
@@ -4,6 +4,12 @@
 COPY install_rvm.sh /root/install_rvm.sh
 RUN sh /root/install_rvm.sh
 
+FROM fedora:36 AS clang-tidy-headers
+MAINTAINER Kyle Edwards <kyle.edwards@kitware.com>
+
+COPY install_clang_tidy_headers.sh /root/install_clang_tidy_headers.sh
+RUN sh /root/install_clang_tidy_headers.sh
+
 FROM fedora:36
 MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
 
@@ -13,3 +19,6 @@
 COPY --from=rvm-build /root/rvm.tar /root/rvm.tar
 RUN tar -C /usr/local -xf /root/rvm.tar \
  && rm /root/rvm.tar
+COPY --from=clang-tidy-headers /root/clang-tidy-headers.tar /root/clang-tidy-headers.tar
+RUN tar -C /usr/include -xf /root/clang-tidy-headers.tar \
+ && rm /root/clang-tidy-headers.tar
diff --git a/.gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh b/.gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh
new file mode 100755
index 0000000..b9883f4
--- /dev/null
+++ b/.gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+# Packages for building the clang-tidy plugin.
+# TODO: Upstream this as a proper Fedora package.
+dnf install --setopt=install_weak_deps=False -y \
+    'dnf-command(download)' \
+    rpm-build \
+    python3-devel \
+    clang-tools-extra
+clang_source_rpm=$(rpm -q --queryformat '%{SOURCERPM}' clang-tools-extra)
+clang_version=$(rpm -q --queryformat '%{VERSION}' clang-tools-extra)
+dnf download --source -y clang
+rpm -i "$clang_source_rpm"
+rpmbuild -bp /root/rpmbuild/SPECS/clang.spec
+cd "/root/rpmbuild/BUILD/clang-tools-extra-$clang_version.src"
+find clang-tidy -name '*.h' | tar -cf /root/clang-tidy-headers.tar -T -
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index 74af444..a46ec22 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -69,7 +69,7 @@
 ### Fedora
 
 .fedora36:
-    image: "kitware/cmake:ci-fedora36-x86_64-2022-08-30"
+    image: "kitware/cmake:ci-fedora36-x86_64-2022-08-31"
 
     variables:
         GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes"
diff --git a/Help/prop_gbl/CMAKE_CUDA_KNOWN_FEATURES.rst b/Help/prop_gbl/CMAKE_CUDA_KNOWN_FEATURES.rst
index d93a9c1..a31ee3a 100644
--- a/Help/prop_gbl/CMAKE_CUDA_KNOWN_FEATURES.rst
+++ b/Help/prop_gbl/CMAKE_CUDA_KNOWN_FEATURES.rst
@@ -36,4 +36,9 @@
 
   Compiler mode is at least CUDA/C++ 23.
 
+``cuda_std_26``
+  .. versionadded:: 3.25
+
+  Compiler mode is at least CUDA/C++ 26.
+
 .. include:: CMAKE_LANG_STD_FLAGS.txt
diff --git a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
index 6846850..3832f1a 100644
--- a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -46,6 +46,11 @@
 
   Compiler mode is at least C++ 23.
 
+``cxx_std_26``
+  .. versionadded:: 3.25
+
+  Compiler mode is at least C++ 26.
+
 .. include:: CMAKE_LANG_STD_FLAGS.txt
 
 Low level individual compile features
diff --git a/Help/prop_tgt/CUDA_STANDARD.rst b/Help/prop_tgt/CUDA_STANDARD.rst
index 950ba12..ada69b9 100644
--- a/Help/prop_tgt/CUDA_STANDARD.rst
+++ b/Help/prop_tgt/CUDA_STANDARD.rst
@@ -39,6 +39,12 @@
 
   CUDA C++23
 
+``26``
+  .. versionadded:: 3.25
+
+  CUDA C++26. CMake 3.25 and later *recognize* ``26`` as a valid value,
+  no version has support for any compiler.
+
 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
 means that using:
diff --git a/Help/prop_tgt/CXX_STANDARD.rst b/Help/prop_tgt/CXX_STANDARD.rst
index b10d201..9b381e4 100644
--- a/Help/prop_tgt/CXX_STANDARD.rst
+++ b/Help/prop_tgt/CXX_STANDARD.rst
@@ -37,6 +37,12 @@
 
   C++23
 
+``26``
+  .. versionadded:: 3.25
+
+  C++26. CMake 3.25 and later *recognize* ``26`` as a valid value,
+  no version has support for any compiler.
+
 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
 means that using:
diff --git a/Help/prop_tgt/HIP_STANDARD.rst b/Help/prop_tgt/HIP_STANDARD.rst
index 0c767c6..9de8730 100644
--- a/Help/prop_tgt/HIP_STANDARD.rst
+++ b/Help/prop_tgt/HIP_STANDARD.rst
@@ -25,6 +25,12 @@
 ``23``
   HIP C++23
 
+``26``
+  .. versionadded:: 3.25
+
+  HIP C++26. CMake 3.25 and later *recognize* ``26`` as a valid value,
+  no version has support for any compiler.
+
 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
 means that using:
diff --git a/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst b/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst
index cba8ac9..2e039bd 100644
--- a/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst
+++ b/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst
@@ -14,3 +14,8 @@
 This property is initialized by the value of
 the :variable:`CMAKE_<LANG>_COMPILER_LAUNCHER` variable if it is set
 when a target is created.
+
+.. versionadded:: 3.25
+
+  The property value may use
+  :manual:`generator expressions <cmake-generator-expressions(7)>`.
diff --git a/Help/prop_tgt/OBJCXX_STANDARD.rst b/Help/prop_tgt/OBJCXX_STANDARD.rst
index 654e687..6ac8216 100644
--- a/Help/prop_tgt/OBJCXX_STANDARD.rst
+++ b/Help/prop_tgt/OBJCXX_STANDARD.rst
@@ -31,6 +31,12 @@
 
   Objective C++23
 
+``26``
+  .. versionadded:: 3.25
+
+  Objective C++26. CMake 3.25 and later *recognize* ``26`` as a valid value,
+  no version has support for any compiler.
+
 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
 means that using:
diff --git a/Help/release/dev/compiler-launcher-genexp.rst b/Help/release/dev/compiler-launcher-genexp.rst
new file mode 100644
index 0000000..0e79992
--- /dev/null
+++ b/Help/release/dev/compiler-launcher-genexp.rst
@@ -0,0 +1,5 @@
+compiler-launcher-genexp
+------------------------
+
+* The :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target property now supports
+  :manual:`generator expressions <cmake-generator-expressions(7)>`.
diff --git a/Help/release/dev/cxx_std_26.rst b/Help/release/dev/cxx_std_26.rst
new file mode 100644
index 0000000..831f567
--- /dev/null
+++ b/Help/release/dev/cxx_std_26.rst
@@ -0,0 +1,8 @@
+cxx_std_26
+----------
+
+* C++26 compiler modes may now be specified via the :prop_tgt:`CXX_STANDARD`,
+  :prop_tgt:`CUDA_STANDARD`, :prop_tgt:`HIP_STANDARD`, or
+  :prop_tgt:`OBJCXX_STANDARD` target properties,
+  or via the :manual:`Compile Features <cmake-compile-features(7)>`
+  functionality's ``cxx_std_26`` meta-feature.
diff --git a/Modules/CMakeDetermineCompileFeatures.cmake b/Modules/CMakeDetermineCompileFeatures.cmake
index a08e597..09de7b1 100644
--- a/Modules/CMakeDetermineCompileFeatures.cmake
+++ b/Modules/CMakeDetermineCompileFeatures.cmake
@@ -63,6 +63,7 @@
     set(CMAKE_CXX17_COMPILE_FEATURES)
     set(CMAKE_CXX20_COMPILE_FEATURES)
     set(CMAKE_CXX23_COMPILE_FEATURES)
+    set(CMAKE_CXX26_COMPILE_FEATURES)
 
     include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
 
@@ -73,6 +74,9 @@
       return()
     endif()
 
+    if (CMAKE_CXX23_COMPILE_FEATURES AND CMAKE_CXX26_COMPILE_FEATURES)
+      list(REMOVE_ITEM CMAKE_CXX26_COMPILE_FEATURES ${CMAKE_CXX23_COMPILE_FEATURES})
+    endif()
     if (CMAKE_CXX20_COMPILE_FEATURES AND CMAKE_CXX23_COMPILE_FEATURES)
       list(REMOVE_ITEM CMAKE_CXX23_COMPILE_FEATURES ${CMAKE_CXX20_COMPILE_FEATURES})
     endif()
@@ -97,6 +101,7 @@
         ${CMAKE_CXX17_COMPILE_FEATURES}
         ${CMAKE_CXX20_COMPILE_FEATURES}
         ${CMAKE_CXX23_COMPILE_FEATURES}
+        ${CMAKE_CXX26_COMPILE_FEATURES}
       )
     endif()
 
@@ -107,6 +112,7 @@
     set(CMAKE_CXX17_COMPILE_FEATURES ${CMAKE_CXX17_COMPILE_FEATURES} PARENT_SCOPE)
     set(CMAKE_CXX20_COMPILE_FEATURES ${CMAKE_CXX20_COMPILE_FEATURES} PARENT_SCOPE)
     set(CMAKE_CXX23_COMPILE_FEATURES ${CMAKE_CXX23_COMPILE_FEATURES} PARENT_SCOPE)
+    set(CMAKE_CXX26_COMPILE_FEATURES ${CMAKE_CXX26_COMPILE_FEATURES} PARENT_SCOPE)
 
     message(CHECK_PASS "done")
 
@@ -119,6 +125,7 @@
     set(CMAKE_CUDA17_COMPILE_FEATURES)
     set(CMAKE_CUDA20_COMPILE_FEATURES)
     set(CMAKE_CUDA23_COMPILE_FEATURES)
+    set(CMAKE_CUDA26_COMPILE_FEATURES)
 
     include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
 
@@ -129,6 +136,9 @@
       return()
     endif()
 
+    if (CMAKE_CUDA23_COMPILE_FEATURES AND CMAKE_CUDA26_COMPILE_FEATURES)
+      list(REMOVE_ITEM CMAKE_CUDA26_COMPILE_FEATURES ${CMAKE_CUDA23_COMPILE_FEATURES})
+    endif()
     if (CMAKE_CUDA20_COMPILE_FEATURES AND CMAKE_CUDA23_COMPILE_FEATURES)
       list(REMOVE_ITEM CMAKE_CUDA23_COMPILE_FEATURES ${CMAKE_CUDA20_COMPILE_FEATURES})
     endif()
@@ -153,6 +163,7 @@
         ${CMAKE_CUDA17_COMPILE_FEATURES}
         ${CMAKE_CUDA20_COMPILE_FEATURES}
         ${CMAKE_CUDA23_COMPILE_FEATURES}
+        ${CMAKE_CUDA26_COMPILE_FEATURES}
       )
     endif()
 
@@ -163,6 +174,7 @@
     set(CMAKE_CUDA17_COMPILE_FEATURES ${CMAKE_CUDA17_COMPILE_FEATURES} PARENT_SCOPE)
     set(CMAKE_CUDA20_COMPILE_FEATURES ${CMAKE_CUDA20_COMPILE_FEATURES} PARENT_SCOPE)
     set(CMAKE_CUDA23_COMPILE_FEATURES ${CMAKE_CUDA23_COMPILE_FEATURES} PARENT_SCOPE)
+    set(CMAKE_CUDA26_COMPILE_FEATURES ${CMAKE_CUDA26_COMPILE_FEATURES} PARENT_SCOPE)
 
     message(CHECK_PASS "done")
 
@@ -175,6 +187,8 @@
     set(CMAKE_HIP17_COMPILE_FEATURES)
     set(CMAKE_HIP20_COMPILE_FEATURES)
     set(CMAKE_HIP23_COMPILE_FEATURES)
+    set(CMAKE_HIP26_COMPILE_FEATURES)
+
 
     include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
 
@@ -185,6 +199,9 @@
       return()
     endif()
 
+    if (CMAKE_HIP23_COMPILE_FEATURES AND CMAKE_HIP26_COMPILE_FEATURES)
+      list(REMOVE_ITEM CMAKE_HIP26_COMPILE_FEATURES ${CMAKE_HIP23_COMPILE_FEATURES})
+    endif()
     if (CMAKE_HIP20_COMPILE_FEATURES AND CMAKE_HIP23_COMPILE_FEATURES)
       list(REMOVE_ITEM CMAKE_HIP23_COMPILE_FEATURES ${CMAKE_HIP20_COMPILE_FEATURES})
     endif()
@@ -209,6 +226,7 @@
         ${CMAKE_HIP17_COMPILE_FEATURES}
         ${CMAKE_HIP20_COMPILE_FEATURES}
         ${CMAKE_HIP23_COMPILE_FEATURES}
+        ${CMAKE_HIP26_COMPILE_FEATURES}
       )
     endif()
 
@@ -219,6 +237,7 @@
     set(CMAKE_HIP17_COMPILE_FEATURES ${CMAKE_HIP17_COMPILE_FEATURES} PARENT_SCOPE)
     set(CMAKE_HIP20_COMPILE_FEATURES ${CMAKE_HIP20_COMPILE_FEATURES} PARENT_SCOPE)
     set(CMAKE_HIP23_COMPILE_FEATURES ${CMAKE_HIP23_COMPILE_FEATURES} PARENT_SCOPE)
+    set(CMAKE_HIP26_COMPILE_FEATURES ${CMAKE_HIP26_COMPILE_FEATURES} PARENT_SCOPE)
 
     message(CHECK_PASS "done")
 
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index df115d3..257402a 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -255,6 +255,7 @@
         cxx_std_17
         cxx_std_20
         cxx_std_23
+        cxx_std_26
         )
       _record_compiler_features(${lang} "" CMAKE_${lang}_COMPILE_FEATURES)
     endmacro()
diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake
index 75165fd..60d13f1 100644
--- a/Modules/Compiler/MSVC-CXX.cmake
+++ b/Modules/Compiler/MSVC-CXX.cmake
@@ -72,6 +72,7 @@
       cxx_std_17
       cxx_std_20
       cxx_std_23
+      cxx_std_26
       )
     _record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES)
   endmacro()
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 48ef5eb..ec2c345 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -85,10 +85,18 @@
 Users or projects may set the following variables to configure the module
 behavior:
 
+:variable:`Matlab_ROOT <<PackageName>_ROOT>`
+  .. versionadded:: 3.25
+
+  Default value for :variable:`Matlab_ROOT_DIR`, the root of the Matlab
+  installation.
+
 :variable:`Matlab_ROOT_DIR`
-  the root of the Matlab installation.
+  The root of the Matlab installation.
+
 :variable:`MATLAB_FIND_DEBUG`
   outputs debug information
+
 :variable:`MATLAB_ADDITIONAL_VERSIONS`
   additional versions of Matlab for the automatic retrieval of the installed
   versions.
@@ -843,6 +851,15 @@
     endif()
   endif()
 
+  if(NOT EXISTS "${_matlab_temporary_folder}/matlabVersionLog.cmaketmp")
+    # last resort check as some HPC with "module load matlab" not enacted fail to catch in earlier checks
+    # and error CMake configure even if find_package(Matlab) is not REQUIRED
+    if(MATLAB_FIND_DEBUG)
+      message(WARNING "[MATLAB] Unable to determine the version of Matlab. The version log file does not exist.")
+    endif()
+    return()
+  endif()
+
   # if successful, read back the log
   file(READ "${_matlab_temporary_folder}/matlabVersionLog.cmaketmp" _matlab_version_from_cmd)
   file(REMOVE "${_matlab_temporary_folder}/matlabVersionLog.cmaketmp")
@@ -1572,6 +1589,13 @@
 # this variable will get all Matlab installations found in the current system.
 set(_matlab_possible_roots)
 
+if(NOT DEFINED Matlab_ROOT AND DEFINED ENV{Matlab_ROOT})
+  set(Matlab_ROOT $ENV{Matlab_ROOT})
+endif()
+if(DEFINED Matlab_ROOT)
+  set(Matlab_ROOT_DIR ${Matlab_ROOT})
+endif()
+
 if(Matlab_ROOT_DIR)
   # if the user specifies a possible root, we keep this one
 
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 2233aa0..c92fbdc 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -121,13 +121,16 @@
   if(UNIX)
     list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
         "postgresql${suffix}"
+        "postgresql@${suffix}"
         "pgsql-${suffix}/lib")
     list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
         "postgresql${suffix}"
+        "postgresql@${suffix}"
         "postgresql/${suffix}"
         "pgsql-${suffix}/include")
     list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
         "postgresql${suffix}/server"
+        "postgresql@${suffix}/server"
         "postgresql/${suffix}/server"
         "pgsql-${suffix}/include/server")
   endif()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 91c9513..6845c6c 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 24)
-set(CMake_VERSION_PATCH 20220831)
+set(CMake_VERSION_PATCH 20220902)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7523662..eb85b47 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3650,6 +3650,7 @@
         }
       }
     } else {
+      linkDir = cmSystemTools::GetParentDirectory(linkDir);
       if (std::find(linkSearchPaths.begin(), linkSearchPaths.end(), linkDir) ==
           linkSearchPaths.end()) {
         linkSearchPaths.push_back(linkDir);
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 1e1df79..d19bbb9 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1042,8 +1042,10 @@
          lang == "OBJCXX")) {
       std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
       cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
-      if (cmNonempty(clauncher)) {
-        compilerLauncher = *clauncher;
+      std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
+        *clauncher, this->LocalGenerator, config);
+      if (!evaluatedClauncher.empty()) {
+        compilerLauncher = evaluatedClauncher;
       }
     }
 
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index a4080d8..e4427f5 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -912,8 +912,10 @@
        lang == "OBJCXX")) {
     std::string const clauncher_prop = cmStrCat(lang, "_COMPILER_LAUNCHER");
     cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
-    if (cmNonempty(clauncher)) {
-      compilerLauncher = *clauncher;
+    std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
+      *clauncher, this->LocalGenerator, config);
+    if (!evaluatedClauncher.empty()) {
+      compilerLauncher = evaluatedClauncher;
     }
   }
 
diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx
index be15288..d2eac0c 100644
--- a/Source/cmStandardLevelResolver.cxx
+++ b/Source/cmStandardLevelResolver.cxx
@@ -379,25 +379,29 @@
         "C", std::vector<int>{ 90, 99, 11, 17, 23 },
         std::vector<std::string>{ "90", "99", "11", "17", "23" } } },
     { "CXX",
-      StandardLevelComputer{
-        "CXX", std::vector<int>{ 98, 11, 14, 17, 20, 23 },
-        std::vector<std::string>{ "98", "11", "14", "17", "20", "23" } } },
+      StandardLevelComputer{ "CXX",
+                             std::vector<int>{ 98, 11, 14, 17, 20, 23, 26 },
+                             std::vector<std::string>{ "98", "11", "14", "17",
+                                                       "20", "23", "26" } } },
     { "CUDA",
-      StandardLevelComputer{
-        "CUDA", std::vector<int>{ 03, 11, 14, 17, 20, 23 },
-        std::vector<std::string>{ "03", "11", "14", "17", "20", "23" } } },
+      StandardLevelComputer{ "CUDA",
+                             std::vector<int>{ 03, 11, 14, 17, 20, 23, 26 },
+                             std::vector<std::string>{ "03", "11", "14", "17",
+                                                       "20", "23", "26" } } },
     { "OBJC",
       StandardLevelComputer{
         "OBJC", std::vector<int>{ 90, 99, 11, 17, 23 },
         std::vector<std::string>{ "90", "99", "11", "17", "23" } } },
     { "OBJCXX",
-      StandardLevelComputer{
-        "OBJCXX", std::vector<int>{ 98, 11, 14, 17, 20, 23 },
-        std::vector<std::string>{ "98", "11", "14", "17", "20", "23" } } },
+      StandardLevelComputer{ "OBJCXX",
+                             std::vector<int>{ 98, 11, 14, 17, 20, 23, 26 },
+                             std::vector<std::string>{ "98", "11", "14", "17",
+                                                       "20", "23", "26" } } },
     { "HIP",
-      StandardLevelComputer{
-        "HIP", std::vector<int>{ 98, 11, 14, 17, 20, 23 },
-        std::vector<std::string>{ "98", "11", "14", "17", "20", "23" } } }
+      StandardLevelComputer{ "HIP",
+                             std::vector<int>{ 98, 11, 14, 17, 20, 23, 26 },
+                             std::vector<std::string>{ "98", "11", "14", "17",
+                                                       "20", "23", "26" } } }
   };
 }
 
diff --git a/Source/cmake.h b/Source/cmake.h
index a631647..8c0fece 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -861,6 +861,7 @@
   F(cxx_std_17)                                                               \
   F(cxx_std_20)                                                               \
   F(cxx_std_23)                                                               \
+  F(cxx_std_26)                                                               \
   FOR_EACH_CXX98_FEATURE(F)                                                   \
   FOR_EACH_CXX11_FEATURE(F)                                                   \
   FOR_EACH_CXX14_FEATURE(F)
@@ -871,7 +872,8 @@
   F(cuda_std_14)                                                              \
   F(cuda_std_17)                                                              \
   F(cuda_std_20)                                                              \
-  F(cuda_std_23)
+  F(cuda_std_23)                                                              \
+  F(cuda_std_26)
 
 #define FOR_EACH_HIP_FEATURE(F)                                               \
   F(hip_std_98)                                                               \
@@ -879,4 +881,5 @@
   F(hip_std_14)                                                               \
   F(hip_std_17)                                                               \
   F(hip_std_20)                                                               \
-  F(hip_std_23)
+  F(hip_std_23)                                                               \
+  F(hip_std_26)
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index c6d1e8a..f3d3a73 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -356,6 +356,7 @@
       HAVE_CXX_STD_17=$<COMPILE_FEATURES:cxx_std_17>
       HAVE_CXX_STD_20=$<COMPILE_FEATURES:cxx_std_20>
       HAVE_CXX_STD_23=$<COMPILE_FEATURES:cxx_std_23>
+      HAVE_CXX_STD_26=$<COMPILE_FEATURES:cxx_std_26>
     )
   endif()
 
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp
index 9c3910e..048f3de 100644
--- a/Tests/CompileFeatures/genex_test.cpp
+++ b/Tests/CompileFeatures/genex_test.cpp
@@ -27,6 +27,9 @@
 #  if HAVE_CXX_STD_23 && !defined(ALLOW_LATER_STANDARDS)
 #    error HAVE_CXX_STD_23 is true with CXX_STANDARD == 11
 #  endif
+#  if HAVE_CXX_STD_26 && !defined(ALLOW_LATER_STANDARDS)
+#    error HAVE_CXX_STD_26 is true with CXX_STANDARD == 11
+#  endif
 #endif
 
 #if !HAVE_OVERRIDE_CONTROL
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 5df22d2..9493a2f 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -5,6 +5,14 @@
 cmake_policy(SET CMP0054 NEW)
 project (Complex)
 
+# Inform the test if the debug configuration is getting built.
+string(APPEND CMAKE_C_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+
 # Test that renaming a built-in works when configured multiple times.
 message("message")
 function(message)
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 49e97d5..67a1645 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -62,7 +62,7 @@
 #  error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
 #endif
 
-#if defined(NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
+#if defined(COMPLEX_NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
 #  error Per-configuration directory-level definition not inherited.
 #endif
 
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 5a4134d..e4fdc68 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -5,6 +5,14 @@
 cmake_policy(SET CMP0054 NEW)
 project (Complex)
 
+# Inform the test if the debug configuration is getting built.
+string(APPEND CMAKE_C_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+
 # Try setting a new policy.  The IF test is for coverage.
 if(POLICY CMP0003)
   cmake_policy(SET CMP0003 NEW)
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 54c18f4..097668b 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -62,7 +62,7 @@
 #  error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
 #endif
 
-#if defined(NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
+#if defined(COMPLEX_NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
 #  error Per-configuration directory-level definition not inherited.
 #endif
 
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt
index 4347459..84ca5e8 100644
--- a/Tests/Preprocess/CMakeLists.txt
+++ b/Tests/Preprocess/CMakeLists.txt
@@ -197,9 +197,14 @@
 #-----------------------------------------------------------------------------
 
 # Inform the test if the debug configuration is getting built.
-# The NDEBUG definition takes care of this for release.
 string(APPEND CMAKE_C_FLAGS_DEBUG " -DPREPROCESS_DEBUG")
 string(APPEND CMAKE_CXX_FLAGS_DEBUG " -DPREPROCESS_DEBUG")
+string(APPEND CMAKE_C_FLAGS_RELEASE " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_MINSIZEREL " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DPREPROCESS_NDEBUG")
 
 # Inform the test if it built from Xcode.
 if(PP_XCODE)
diff --git a/Tests/Preprocess/preprocess.c b/Tests/Preprocess/preprocess.c
index b3117da..88f9e97 100644
--- a/Tests/Preprocess/preprocess.c
+++ b/Tests/Preprocess/preprocess.c
@@ -33,7 +33,7 @@
       result = 0;
     }
   }
-#ifdef NDEBUG
+#ifdef PREPROCESS_NDEBUG
 #  ifdef FILE_DEF_DEBUG
   {
     fprintf(stderr, "FILE_DEF_DEBUG should not be defined in C\n");
diff --git a/Tests/Preprocess/preprocess.cxx b/Tests/Preprocess/preprocess.cxx
index f2fffef..50150d1 100644
--- a/Tests/Preprocess/preprocess.cxx
+++ b/Tests/Preprocess/preprocess.cxx
@@ -35,7 +35,7 @@
       result = 0;
     }
   }
-#ifdef NDEBUG
+#ifdef PREPROCESS_NDEBUG
 #  ifdef FILE_DEF_DEBUG
   {
     fprintf(stderr, "FILE_DEF_DEBUG should not be defined in CXX\n");
diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
index 84d0479..e6a2605 100644
--- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
@@ -17,7 +17,8 @@
 
 function(run_compiler_launcher_env lang)
   string(REGEX REPLACE "-.*" "" core_lang "${lang}")
-  set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1")
+  # Use the noop genexp $<PATH:...> genexp to validate genexp support.
+  set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1")
   run_compiler_launcher(${lang})
   unset(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER})
 endfunction()
diff --git a/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake
new file mode 100644
index 0000000..1f3c19d
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 3.23)
+
+project(BundleLinkBundle CXX)
+
+add_subdirectory(lib_bundle)
+
+add_executable(MainBundle MACOSX_BUNDLE main_bundle.cpp)
+
+target_link_libraries(MainBundle PRIVATE LibBundle)
+
+set_target_properties(MainBundle PROPERTIES
+    MACOSX_BUNDLE "YES"
+    XCODE_LINK_BUILD_PHASE_MODE BUILT_ONLY
+)
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 80c6b73..d20f5a6 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -151,6 +151,16 @@
 
 XcodeXCConfig()
 
+function(BundleLinkBundle)
+  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/BundleLinkBundle-build)
+  run_cmake(BundleLinkBundle)
+  set(RunCMake_TEST_NO_CLEAN 1)
+  run_cmake_command(BundleLinkBundle-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+BundleLinkBundle()
+
+
 # Isolate device tests from host architecture selection.
 unset(ENV{CMAKE_OSX_ARCHITECTURES})
 
diff --git a/Tests/RunCMake/XcodeProject/lib_bundle/CMakeLIsts.txt b/Tests/RunCMake/XcodeProject/lib_bundle/CMakeLIsts.txt
new file mode 100644
index 0000000..7a50ce8
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/lib_bundle/CMakeLIsts.txt
@@ -0,0 +1,5 @@
+
+add_library(LibBundle lib_bundle.cpp)
+
+set_target_properties(LibBundle PROPERTIES
+      MACOSX_BUNDLE YES)
diff --git a/Tests/RunCMake/XcodeProject/lib_bundle/lib_bundle.cpp b/Tests/RunCMake/XcodeProject/lib_bundle/lib_bundle.cpp
new file mode 100644
index 0000000..9f74584
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/lib_bundle/lib_bundle.cpp
@@ -0,0 +1,6 @@
+#include <iostream>
+
+void foo()
+{
+  std::cout << "foobar" << std::endl;
+}
diff --git a/Tests/RunCMake/XcodeProject/main_bundle.cpp b/Tests/RunCMake/XcodeProject/main_bundle.cpp
new file mode 100644
index 0000000..11834ac
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/main_bundle.cpp
@@ -0,0 +1,9 @@
+
+extern void foo();
+
+int main()
+{
+
+  foo();
+  return 0;
+}