mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 10:20:56 -06:00
cmExperimental: add an experimental feature to handle C++ modules
This commit is contained in:
@@ -7,6 +7,23 @@ See documentation on `CMake Development`_ for more information.
|
||||
|
||||
.. _`CMake Development`: README.rst
|
||||
|
||||
Features are gated behind ``CMAKE_EXPERIMENTAL_`` variables which must be set
|
||||
to specific values in order to enable their gated behaviors. Note that the
|
||||
specific values will change over time to reinforce their experimental nature.
|
||||
When used, a warning will be generated to indicate that an experimental
|
||||
feature is in use and that the affected behavior in the project is not part of
|
||||
CMake's stability guarantees.
|
||||
|
||||
C++20 Module APIs
|
||||
=================
|
||||
|
||||
Variable: ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
||||
Value: ``17be90bd-a850-44e0-be50-448de847d652``
|
||||
|
||||
In order to support C++20 modules, there are a number of behaviors that have
|
||||
CMake APIs to provide the required features to build and export them from a
|
||||
project.
|
||||
|
||||
C++20 Module Dependencies
|
||||
=========================
|
||||
|
||||
|
||||
@@ -25,7 +25,14 @@ struct FeatureData
|
||||
std::string const Variable;
|
||||
std::string const Description;
|
||||
bool Warned;
|
||||
} LookupTable[] = {};
|
||||
} LookupTable[] = {
|
||||
// CxxModuleCMakeApi
|
||||
{ "17be90bd-a850-44e0-be50-448de847d652",
|
||||
"CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API",
|
||||
"CMake's C++ module support is experimental. It is meant only for "
|
||||
"experimentation and feedback to CMake developers.",
|
||||
false },
|
||||
};
|
||||
static_assert(sizeof(LookupTable) / sizeof(LookupTable[0]) ==
|
||||
static_cast<size_t>(cmExperimental::Feature::Sentinel),
|
||||
"Experimental feature lookup table mismatch");
|
||||
|
||||
@@ -12,6 +12,8 @@ class cmExperimental
|
||||
public:
|
||||
enum class Feature
|
||||
{
|
||||
CxxModuleCMakeApi,
|
||||
|
||||
Sentinel,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user