diff options
author | Brad King <brad.king@kitware.com> | 2022-08-22 20:37:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-22 20:50:51 (GMT) |
commit | 3490d7a9fc0b2dea07b1a364d0c02b13ec88a809 (patch) | |
tree | fe3fea8221f7b138104851761c20ce92dc65e5ce /.gitlab | |
parent | 7037cfc0f48739bd1eb3498827ebf501671302c7 (diff) | |
download | CMake-3490d7a9fc0b2dea07b1a364d0c02b13ec88a809.zip CMake-3490d7a9fc0b2dea07b1a364d0c02b13ec88a809.tar.gz CMake-3490d7a9fc0b2dea07b1a364d0c02b13ec88a809.tar.bz2 |
ci: Enable MSVC C++ module support tests
Since commit b87645b6a5 (gitlab-ci: Update non-packaging Windows builds
to MSVC 14.33 toolset, 2022-08-18), the version of MSVC used in CI test
jobs supports the `cl -scanDependencies` functionality we need to
support C++ modules. Enable the corresponding tests.
Diffstat (limited to '.gitlab')
4 files changed, 15 insertions, 0 deletions
diff --git a/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake b/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake new file mode 100644 index 0000000..8570196 --- /dev/null +++ b/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake @@ -0,0 +1,2 @@ +set(CMake_TEST_MODULE_COMPILATION "named,partitions,internal_partitions,shared,export_bmi,install_bmi" CACHE STRING "") +set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_msvc.cmake" CACHE STRING "") diff --git a/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake b/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake index 7f57181..f5a6d80 100644 --- a/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake +++ b/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake @@ -2,4 +2,5 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common_ninja.cmake") diff --git a/.gitlab/ci/configure_windows_vs2022_x64_ninja_multi.cmake b/.gitlab/ci/configure_windows_vs2022_x64_ninja_multi.cmake index 5b2f0b7..2b0c76d 100644 --- a/.gitlab/ci/configure_windows_vs2022_x64_ninja_multi.cmake +++ b/.gitlab/ci/configure_windows_vs2022_x64_ninja_multi.cmake @@ -2,4 +2,5 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_common.cmake") diff --git a/.gitlab/ci/cxx_modules_rules_msvc.cmake b/.gitlab/ci/cxx_modules_rules_msvc.cmake new file mode 100644 index 0000000..5f0ae76 --- /dev/null +++ b/.gitlab/ci/cxx_modules_rules_msvc.cmake @@ -0,0 +1,11 @@ +set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") + +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>") |