Files
CMake/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake
T
Ben Boeckel 889aa0354a CMP0155: ignore scanning for sources if no scanner is available
This allows for a more graceful transition for projects using C++20
without scanner support (e.g., Clang 15 or GCC 13). While newer
compilers will (needlessly) scan, it allows C++20-using projects to use
older compilers without having to set `CMAKE_CXX_SCAN_FOR_MODULES` to
support newer CMake minimum versions.

Fixes: #25357
2023-11-01 09:52:08 -04:00

12 lines
232 B
CMake

enable_language(CXX)
unset(CMAKE_CXX_SCANDEP_SOURCE)
cmake_policy(SET CMP0155 NEW)
add_library(cmp0155-new
sources/cxx-anchor.cxx)
set_target_properties(cmp0155-new
PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON)