From 07bc3b07ec8796f4a067ede7f4426ccbfa8ab858 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 14 Jun 2022 17:11:55 -0400 Subject: gitlab-ci: test C++ modules using GCC --- .gitlab-ci.yml | 20 ++++++++++++++++++ .../ci/configure_linux_gcc_cxx_modules_ninja.cmake | 4 ++++ ...nfigure_linux_gcc_cxx_modules_ninja_multi.cmake | 4 ++++ .gitlab/ci/cxx_modules_rules_gcc.cmake | 10 +++++++++ .gitlab/os-linux.yml | 24 ++++++++++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 .gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake create mode 100644 .gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake create mode 100644 .gitlab/ci/cxx_modules_rules_gcc.cmake diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc05626..930c4bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -275,6 +275,26 @@ t:hip4.2-radeon: variables: CMAKE_CI_NO_MR: "true" +t:linux-gcc-cxx-modules-ninja: + extends: + - .gcc_cxx_modules_ninja + - .cmake_test_linux_release + - .linux_builder_tags + - .run_dependent + - .needs_centos6_x86_64 + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + +t:linux-gcc-cxx-modules-ninja-multi: + extends: + - .gcc_cxx_modules_ninja_multi + - .cmake_test_linux_release + - .linux_builder_tags + - .run_dependent + - .needs_centos6_x86_64 + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + b:fedora36-ninja: extends: - .fedora36_ninja 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 + " -E -x c++ " + " -MT -MD -MF " + " -fmodules-ts -fdep-file= -fdep-output= -fdep-format=trtbd" + " -o ") +set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "gcc") +set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "-fmodules-ts -fmodule-mapper= -fdep-format=trtbd -x c++") diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 0b2d382..6afd299 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -299,6 +299,30 @@ CMAKE_CONFIGURATION: hip4.2_radeon CMAKE_GENERATOR: "Ninja Multi-Config" +### C++ modules + +.gcc_cxx_modules_x86_64: + image: "kitware/cmake:ci-gcc_cxx_modules-x86_64-2022-06-14" + + variables: + GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" + CMAKE_ARCH: x86_64 + CC: "/opt/gcc-p1689/bin/gcc" + CXX: "/opt/gcc-p1689/bin/g++" + +.gcc_cxx_modules_ninja: + extends: .gcc_cxx_modules_x86_64 + + variables: + CMAKE_CONFIGURATION: linux_gcc_cxx_modules_ninja + +.gcc_cxx_modules_ninja_multi: + extends: .gcc_cxx_modules_x86_64 + + variables: + CMAKE_CONFIGURATION: linux_gcc_cxx_modules_ninja_multi + CMAKE_GENERATOR: "Ninja Multi-Config" + ## Tags .linux_builder_tags: -- cgit v0.12