summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-29 15:22:39 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-11-29 15:22:48 (GMT)
commita7a7a76e02f78e91f197121c5455c21a382c7efd (patch)
tree6e021ea5ee85e8a0d8eed74dc56d18b01b3ad401
parentd8967ad9170ae66729f1046adf906cdef3e4661d (diff)
parent12e4bc73cba0218a3e9a9a23d43f7b3d7d8e004e (diff)
downloadCMake-a7a7a76e02f78e91f197121c5455c21a382c7efd.zip
CMake-a7a7a76e02f78e91f197121c5455c21a382c7efd.tar.gz
CMake-a7a7a76e02f78e91f197121c5455c21a382c7efd.tar.bz2
Merge topic 'msvc-cxx-no-optin-experimental-flag'
12e4bc73cb MSVC: don't opt into dyndep support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7965
-rw-r--r--.gitlab/ci/cxx_modules_rules_msvc.cmake2
-rw-r--r--Help/dev/experimental.rst3
-rw-r--r--Modules/Compiler/MSVC-CXX.cmake1
3 files changed, 4 insertions, 2 deletions
diff --git a/.gitlab/ci/cxx_modules_rules_msvc.cmake b/.gitlab/ci/cxx_modules_rules_msvc.cmake
index 2b09b0e..cb327fd 100644
--- a/.gitlab/ci/cxx_modules_rules_msvc.cmake
+++ b/.gitlab/ci/cxx_modules_rules_msvc.cmake
@@ -1 +1,3 @@
set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3")
+
+set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
diff --git a/Help/dev/experimental.rst b/Help/dev/experimental.rst
index 78770f7..03eb076 100644
--- a/Help/dev/experimental.rst
+++ b/Help/dev/experimental.rst
@@ -41,7 +41,8 @@ to tell CMake how to invoke the C++20 module dependency scanning tool.
MSVC 19.34 (provided with Visual Studio 17.4) and above contains the support
that CMake needs and has these variables already set up as required and only
-the UUID variable needs to be set.
+the UUID and the ``CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP`` variables need to be
+set.
For example, add code like the following to a test project:
diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake
index 212f6d1..10a9073 100644
--- a/Modules/Compiler/MSVC-CXX.cmake
+++ b/Modules/Compiler/MSVC-CXX.cmake
@@ -79,7 +79,6 @@ elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)
endif()
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.34")
- set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE
"<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> <SOURCE> -nologo -TP"
" -showIncludes"