summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-28 11:36:14 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2022-12-01 11:42:46 -0500
commit388acfd46dd33d574c46ad640215f56fb576da66 (patch)
tree79349298c2c8c6362171236702f3c7e0b590e9b5 /Tests/RunCMake/CXXModules/RunCMakeTest.cmake
parent069a32b03c812569a143e09e7025be76995495a6 (diff)
downloadcmake-388acfd46dd33d574c46ad640215f56fb576da66.tar.gz
Tests/RunCMake/CXXModules: add support for Visual Studio
Diffstat (limited to 'Tests/RunCMake/CXXModules/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CXXModules/RunCMakeTest.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
index b6eb340de6..01d59f8ad7 100644
--- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
@@ -43,6 +43,11 @@ if (RunCMake_GENERATOR MATCHES "Ninja" AND
set(generator_supports_cxx_modules 1)
endif ()
+if (RunCMake_GENERATOR MATCHES "Visual Studio" AND
+ CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.34")
+ set(generator_supports_cxx_modules 1)
+endif ()
+
# Test behavior when the generator does not support C++20 modules.
if (NOT generator_supports_cxx_modules)
if ("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
@@ -84,6 +89,8 @@ if (RunCMake_GENERATOR MATCHES "Ninja")
run_cmake(NinjaDependInfoFileSet)
run_cmake(NinjaDependInfoExport)
run_cmake(NinjaDependInfoBMIInstall)
+elseif (RunCMake_GENERATOR MATCHES "Visual Studio")
+ # Not supported yet.
else ()
message(FATAL_ERROR
"Please add 'DependInfo' tests for the '${RunCMake_GENERATOR}' generator.")