@@ -49,32 +49,43 @@ if(PODIO_ENABLE_CXX_MODULES)
4949 # This test demonstrates the intended usage pattern when CMake support matures.
5050 # CMake 3.28+ added CXX_MODULE file sets, but consuming them in regular .cpp files
5151 # requires dependency scanning to work correctly, which is still evolving.
52+ #
53+ # KNOWN ISSUES (as of GCC 15 / CMake 3.31):
54+ # - Standard library modules expose TU-local entities, causing compilation errors
55+ # - Module dependency scanning doesn't fully work with imported modules in .cpp files
56+ # - This test will fail to compile until these issues are resolved upstream
5257 if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.30)
53- message (STATUS "CMake ${CMAKE_VERSION} - adding module import demonstration test" )
54- message (STATUS " Note: Direct 'import' in .cpp files requires experimental CMake features " )
55- message (STATUS " This test documents the intended usage when CMake module support matures " )
58+ message (STATUS "CMake ${CMAKE_VERSION} - module import test available but expected to fail " )
59+ message (STATUS " Note: Direct 'import' in .cpp files blocked by compiler/stdlib issues " )
60+ message (STATUS " This test will be enabled once GCC/Clang stdlib modules are stable " )
5661
5762 # This test serves as:
58- # 1. Documentation of how modules SHOULD be consumed when CMake support is complete
59- # 2. A canary to detect when CMake module support reaches maturity
63+ # 1. Documentation of how modules SHOULD be consumed when support is complete
64+ # 2. A canary to detect when module support reaches maturity
6065 # 3. Validation that our module interfaces are correctly structured
61- add_executable (unittest_podio_import cxx_modules_import.cpp )
62- target_link_libraries (unittest_podio_import PRIVATE
63- TestDataModel
64- podio::podio
65- Catch2::Catch2WithMain
66- )
67- target_compile_features (unittest_podio_import PRIVATE cxx_std_20 )
68-
69- # Add the test but mark it as experimental
70- add_test (NAME unittest_import COMMAND unittest_podio_import )
71- PODIO_SET_TEST_ENV (unittest_import )
72- set_tests_properties (unittest_import PROPERTIES
73- LABELS "modules;import;experimental"
74- # This test is expected to fail until CMake module dependency scanning matures
75- # When it starts passing without code changes, CMake support has improved!
76- WILL_FAIL TRUE
77- )
66+ #
67+ # Currently disabled due to known compiler/stdlib issues
68+ # Uncomment when GCC/Clang provide stable standard library module support
69+ #
70+ # add_executable(unittest_podio_import cxx_modules_import.cpp)
71+ # target_link_libraries(unittest_podio_import PRIVATE
72+ # TestDataModel
73+ # podio::podio
74+ # Catch2::Catch2WithMain
75+ # )
76+ # target_compile_features(unittest_podio_import PRIVATE cxx_std_20)
77+ #
78+ # # Enable module scanning for this file
79+ # set_source_files_properties(cxx_modules_import.cpp PROPERTIES
80+ # LANGUAGE CXX
81+ # CXX_SCAN_FOR_MODULES ON
82+ # )
83+ #
84+ # add_test(NAME unittest_import COMMAND unittest_podio_import)
85+ # PODIO_SET_TEST_ENV(unittest_import)
86+ # set_tests_properties(unittest_import PROPERTIES
87+ # LABELS "modules;import;experimental"
88+ # )
7889 else ()
7990 message (STATUS "CMake ${CMAKE_VERSION} - skipping module import test (requires 3.30+)" )
8091 endif ()
0 commit comments