From 5eb7bd641a909925c6341819bc7900300776924f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 21 Sep 2023 17:47:24 -0400 Subject: Tests/RunCMake/CXXModules: remove rules file requirement Only Clang needs to disable extensions in order to work; other implementations work as-is. --- .gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake | 1 - .../ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake | 1 - .gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake | 1 - .gitlab/ci/cxx_modules_rules_clang.cmake | 2 -- .gitlab/ci/cxx_modules_rules_gcc.cmake | 1 - .gitlab/ci/cxx_modules_rules_msvc.cmake | 1 - Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake | 14 ++------------ 7 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 .gitlab/ci/cxx_modules_rules_gcc.cmake delete mode 100644 .gitlab/ci/cxx_modules_rules_msvc.cmake diff --git a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake index 8342db6..f0ba9eb 100644 --- a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake +++ b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake @@ -1,4 +1,3 @@ set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,bmionly" 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 index 8342db6..f0ba9eb 100644 --- a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake +++ b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake @@ -1,4 +1,3 @@ set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,bmionly" 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_windows_msvc_cxx_modules_common.cmake b/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake index 2349bfd..e378d62 100644 --- a/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake +++ b/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake @@ -1,2 +1 @@ set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,shared,export_bmi,install_bmi,bmionly" CACHE STRING "") -set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_msvc.cmake" CACHE STRING "") diff --git a/.gitlab/ci/cxx_modules_rules_clang.cmake b/.gitlab/ci/cxx_modules_rules_clang.cmake index a8e1ff6..1268244 100644 --- a/.gitlab/ci/cxx_modules_rules_clang.cmake +++ b/.gitlab/ci/cxx_modules_rules_clang.cmake @@ -1,5 +1,3 @@ -set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") - # Default to C++ extensions being off. Clang's modules support have trouble # with extensions right now. set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/.gitlab/ci/cxx_modules_rules_gcc.cmake b/.gitlab/ci/cxx_modules_rules_gcc.cmake deleted file mode 100644 index 2b09b0e..0000000 --- a/.gitlab/ci/cxx_modules_rules_gcc.cmake +++ /dev/null @@ -1 +0,0 @@ -set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") diff --git a/.gitlab/ci/cxx_modules_rules_msvc.cmake b/.gitlab/ci/cxx_modules_rules_msvc.cmake deleted file mode 100644 index 2b09b0e..0000000 --- a/.gitlab/ci/cxx_modules_rules_msvc.cmake +++ /dev/null @@ -1 +0,0 @@ -set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") diff --git a/Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake b/Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake index da3c215..1016afd 100644 --- a/Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake +++ b/Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake @@ -1,15 +1,5 @@ -if (NOT EXISTS "${CMake_TEST_MODULE_COMPILATION_RULES}") - message(FATAL_ERROR - "The `CMake_TEST_MODULE_COMPILATION_RULES` file must be specified " - "for these tests to operate.") -endif () - -include("${CMake_TEST_MODULE_COMPILATION_RULES}") - -if (NOT CMake_TEST_CXXModules_UUID STREQUAL "a246741c-d067-4019-a8fb-3d16b0c9d1d3") - message(FATAL_ERROR - "The compilation rule file needs updated for changes in the test " - "suite. Please see the history for what needs to be updated.") +if (CMake_TEST_MODULE_COMPILATION_RULES) + include("${CMake_TEST_MODULE_COMPILATION_RULES}") endif () include(CTest) -- cgit v0.12