Description
Is your feature request related to a problem? Please describe.
Since CMake 3.28, it supports c++ modules (see https://www.kitware.com/import-cmake-the-experiment-is-over/). We can set file set CXX_MODULES
for a library so library or executable depend on it can use its module interface unit. However, prefab does not support c++ modules. The cmake package it generates does not set the CXX_MODULES
file set.
Describe the solution you'd like
Generate CXX_MODULES
file set for the cmake package generated for a prefab package.
Describe alternatives you've considered
In AGP, we can set headers
directory in prefab.package
, maybe it's better to add modules
to set the directory for module interface unit.
Or we can use hardcode some extensions (e.g., .ixx
, .cxx
, .cppm
) to generate the CXX_MODULES
file set instead of add a new directory.
Additional context
"""target_sources($name INTERFACE FILE_SET CXX_MODULES BASE_DIRS "$includes" FILES
"${files.joinToString(';')}")"""