Tests/RunCMake/CXXModules: remove rules file requirement

Only Clang needs to disable extensions in order to work; other
implementations work as-is.
This commit is contained in:
Ben Boeckel
2023-09-21 17:47:24 -04:00
parent ff18acc301
commit 5eb7bd641a
7 changed files with 2 additions and 19 deletions

View File

@@ -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")

View File

@@ -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")

View File

@@ -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 "")

View File

@@ -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)

View File

@@ -1 +0,0 @@
set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3")

View File

@@ -1 +0,0 @@
set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3")

View File

@@ -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)