CMake 3.27 changed the CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API for enabling the experimental C++ module support back then. and CMake 3.28 officially support C++20 modules. so let's set the CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API and set the policy accordingly.
without this change, following steps fail the build
CMake 3.27 changed the
CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
for enabling the experimental C++ module support back then. and CMake 3.28 officially support C++20 modules. so let's set theCMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
and set the policy accordingly.without this change, following steps fail the build
with CMake 3.28.20231228-g158ecdc and Clang 18 (64e63888dd8beae7272c0526e4770e31857dd0e7).
see also https://cmake.org/cmake/help/latest/policy/CMP0155.html
Why
What is changing
Example