Files
CMake/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake
Ben Boeckel d7e65b6178 Tests/CXXModules: mask C++23 std module targets
These tests mess with the availability of C++ module support. Hide
generation of the utility targets from any compiler detection.
2024-04-11 10:19:44 -04:00

15 lines
324 B
CMake

# Block making C++ `import std` targets.
add_library(__CMAKE::CXX23 IMPORTED INTERFACE)
enable_language(CXX)
unset(CMAKE_CXX_SCANDEP_SOURCE)
cmake_policy(SET CMP0155 OLD)
add_executable(cmp0155-old
sources/module-use.cxx)
set_target_properties(cmp0155-old
PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON)