diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-10-04 15:59:09 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-11 21:54:05 (GMT) |
commit | 0e9782b336dbfd544257bee1da9a63cf84cfb058 (patch) | |
tree | add34472f5244fae2f132fc37b420ac5124fc48c /Modules/Compiler/MSVC-CXX.cmake | |
parent | d85f866baae609c91abc08b40cdccb28fd8c9f9c (diff) | |
download | CMake-0e9782b336dbfd544257bee1da9a63cf84cfb058.zip CMake-0e9782b336dbfd544257bee1da9a63cf84cfb058.tar.gz CMake-0e9782b336dbfd544257bee1da9a63cf84cfb058.tar.bz2 |
msvc: bless MSVC 19.34 support for C++ modules as experimental
Visual Studio 17.4 now contains official support for what CMake needs.
Diffstat (limited to 'Modules/Compiler/MSVC-CXX.cmake')
-rw-r--r-- | Modules/Compiler/MSVC-CXX.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake index 60d13f1..212f6d1 100644 --- a/Modules/Compiler/MSVC-CXX.cmake +++ b/Modules/Compiler/MSVC-CXX.cmake @@ -77,3 +77,15 @@ elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) _record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES) endmacro() 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" + " -scanDependencies <DYNDEP_FILE>" + " -Fo<OBJECT>") + set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_DEPFILE_FORMAT "msvc") + set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "msvc") + set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>") +endif () |