mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-16 04:02:03 -06:00
MSVC: don't opt into dyndep support
Instead, just set the variables for how scanning works since that is part of the compiler mechanisms. Fixes: #24198
This commit is contained in:
@@ -1 +1,3 @@
|
||||
set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3")
|
||||
|
||||
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user