diff options
Diffstat (limited to 'Tests')
5 files changed, 29 insertions, 5 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 0399e74..ef088aa 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -1058,6 +1058,10 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k" AND NOT DEFINED CMake_TEST_E2K_BROKEN_L execute_process(COMMAND "${DPKG_QUERY}" "-f" "\${Version}" "-W" "glibc" OUTPUT_VARIABLE LIBC_VERSION) if(LIBC_VERSION MATCHES "2.29-25.*") list(REMOVE_ITEM cpack_tests + DEB.DEFAULT_PERMISSIONS + DEB.DEBUGINFO + DEB.MINIMAL + DEB.PER_COMPONENT_FIELDS DEB.AUTO_SUFFIXES DEB.CUSTOM_NAMES DEB.DEB_PACKAGE_VERSION_BACK_COMPATIBILITY @@ -1125,12 +1129,12 @@ add_RunCMake_test(CMakePresets -DPython_EXECUTABLE=${Python_EXECUTABLE} -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} ) -add_RunCMake_test(CMakePresetsBuild - -DPython_EXECUTABLE=${Python_EXECUTABLE} - -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} - -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} - ) if(NOT CMake_TEST_E2K_BROKEN_LIBC) + add_RunCMake_test(CMakePresetsBuild + -DPython_EXECUTABLE=${Python_EXECUTABLE} + -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} + -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} + ) add_RunCMake_test(CMakePresetsTest -DPython_EXECUTABLE=${Python_EXECUTABLE} -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake index abede44..b0571ed 100644 --- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake @@ -180,6 +180,7 @@ if ("named" IN_LIST CMake_TEST_MODULE_COMPILATION) run_cxx_module_test(non-trivial-collation-order-randomized) run_cxx_module_test(duplicate) set(RunCMake_CXXModules_NO_TEST 1) + run_cxx_module_test(import-from-object) run_cxx_module_test(circular) run_cxx_module_test(try-compile) run_cxx_module_test(try-run) diff --git a/Tests/RunCMake/CXXModules/examples/import-from-object/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-from-object/CMakeLists.txt new file mode 100644 index 0000000..e9ec809 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-from-object/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.24...3.28) +project(cxx_modules_import_from_object CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +set(CMAKE_CXX_STANDARD 20) + +add_library(a STATIC) +target_sources(a + PUBLIC + FILE_SET CXX_MODULES + FILES + object-a.cxx) + +add_library(b OBJECT object-b.cxx) +target_link_libraries(b PRIVATE a) diff --git a/Tests/RunCMake/CXXModules/examples/import-from-object/object-a.cxx b/Tests/RunCMake/CXXModules/examples/import-from-object/object-a.cxx new file mode 100644 index 0000000..9634a8f --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-from-object/object-a.cxx @@ -0,0 +1,2 @@ +module; +export module a; diff --git a/Tests/RunCMake/CXXModules/examples/import-from-object/object-b.cxx b/Tests/RunCMake/CXXModules/examples/import-from-object/object-b.cxx new file mode 100644 index 0000000..3b2a80c --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-from-object/object-b.cxx @@ -0,0 +1 @@ +import a; |