summaryrefslogtreecommitdiffstats
path: root/.gitlab/ci
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-06-14 21:11:55 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-06-16 14:28:34 (GMT)
commit07bc3b07ec8796f4a067ede7f4426ccbfa8ab858 (patch)
treedea76c7286975b9fec949dae605b0f18b5ef6da3 /.gitlab/ci
parent1b2270aa4ed963b64e841e42b3273fe9ffe56a5e (diff)
downloadCMake-07bc3b07ec8796f4a067ede7f4426ccbfa8ab858.zip
CMake-07bc3b07ec8796f4a067ede7f4426ccbfa8ab858.tar.gz
CMake-07bc3b07ec8796f4a067ede7f4426ccbfa8ab858.tar.bz2
gitlab-ci: test C++ modules using GCC
Diffstat (limited to '.gitlab/ci')
-rw-r--r--.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake4
-rw-r--r--.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake4
-rw-r--r--.gitlab/ci/cxx_modules_rules_gcc.cmake10
3 files changed, 18 insertions, 0 deletions
diff --git a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake
new file mode 100644
index 0000000..bf990c8
--- /dev/null
+++ b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake
@@ -0,0 +1,4 @@
+set(CMake_TEST_MODULE_COMPILATION "named,partitions,internal_partitions" CACHE STRING "")
+set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_gcc.cmake" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake
new file mode 100644
index 0000000..bf990c8
--- /dev/null
+++ b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake
@@ -0,0 +1,4 @@
+set(CMake_TEST_MODULE_COMPILATION "named,partitions,internal_partitions" CACHE STRING "")
+set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_gcc.cmake" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/.gitlab/ci/cxx_modules_rules_gcc.cmake b/.gitlab/ci/cxx_modules_rules_gcc.cmake
new file mode 100644
index 0000000..d800099
--- /dev/null
+++ b/.gitlab/ci/cxx_modules_rules_gcc.cmake
@@ -0,0 +1,10 @@
+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> -E -x c++ <SOURCE>"
+ " -MT <DYNDEP_FILE> -MD -MF <DEP_FILE>"
+ " -fmodules-ts -fdep-file=<DYNDEP_FILE> -fdep-output=<OBJECT> -fdep-format=trtbd"
+ " -o <PREPROCESSED_SOURCE>")
+set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "gcc")
+set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "-fmodules-ts -fmodule-mapper=<MODULE_MAP_FILE> -fdep-format=trtbd -x c++")