mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 06:40:16 -05:00
cxxmodules: remove support for CXX_MODULE_HEADER_UNITS filesets
There's no backing implementation for header units anyways, so just remove it for now.
This commit is contained in:
@@ -91,15 +91,6 @@ files within those directories. The acceptable types include:
|
||||
using the ``export`` keyword). This file set type may not have an
|
||||
``INTERFACE`` scope except on ``IMPORTED`` targets.
|
||||
|
||||
``CXX_MODULE_HEADER_UNITS``
|
||||
|
||||
.. note ::
|
||||
|
||||
Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
||||
|
||||
C++ header sources which may be imported by other C++ source code. This file
|
||||
set type may not have an ``INTERFACE`` scope except on ``IMPORTED`` targets.
|
||||
|
||||
The optional default file sets are named after their type. The target may not
|
||||
be a custom target or :prop_tgt:`FRAMEWORK` target.
|
||||
|
||||
@@ -177,31 +168,20 @@ For file sets of type ``CXX_MODULES``:
|
||||
* :prop_tgt:`CXX_MODULE_DIRS`
|
||||
* :prop_tgt:`CXX_MODULE_DIRS_<NAME>`
|
||||
|
||||
For file sets of type ``CXX_MODULE_HEADER_UNITS``:
|
||||
|
||||
* :prop_tgt:`CXX_MODULE_HEADER_UNIT_SETS`
|
||||
* :prop_tgt:`INTERFACE_CXX_MODULE_HEADER_UNIT_SETS`
|
||||
* :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET`
|
||||
* :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET_<NAME>`
|
||||
* :prop_tgt:`CXX_MODULE_HEADER_UNIT_DIRS`
|
||||
* :prop_tgt:`CXX_MODULE_HEADER_UNIT_DIRS_<NAME>`
|
||||
|
||||
Target properties related to include directories are also modified by
|
||||
``target_sources(FILE_SET)`` as follows:
|
||||
|
||||
:prop_tgt:`INCLUDE_DIRECTORIES`
|
||||
|
||||
If the ``TYPE`` is ``HEADERS`` or ``CXX_MODULE_HEADER_UNITS``, and the scope
|
||||
of the file set is ``PRIVATE`` or ``PUBLIC``, all of the ``BASE_DIRS`` of
|
||||
the file set are wrapped in :genex:`$<BUILD_INTERFACE>` and appended to this
|
||||
property.
|
||||
If the ``TYPE`` is ``HEADERS``, and the scope of the file set is ``PRIVATE``
|
||||
or ``PUBLIC``, all of the ``BASE_DIRS`` of the file set are wrapped in
|
||||
:genex:`$<BUILD_INTERFACE>` and appended to this property.
|
||||
|
||||
:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES`
|
||||
|
||||
If the ``TYPE`` is ``HEADERS`` or ``CXX_MODULE_HEADER_UNITS``, and the scope
|
||||
of the file set is ``INTERFACE`` or ``PUBLIC``, all of the ``BASE_DIRS`` of
|
||||
the file set are wrapped in :genex:`$<BUILD_INTERFACE>` and appended to this
|
||||
property.
|
||||
If the ``TYPE`` is ``HEADERS``, and the scope of the file set is
|
||||
``INTERFACE`` or ``PUBLIC``, all of the ``BASE_DIRS`` of the file set are
|
||||
wrapped in :genex:`$<BUILD_INTERFACE>` and appended to this property.
|
||||
|
||||
See Also
|
||||
^^^^^^^^
|
||||
|
||||
@@ -189,11 +189,6 @@ Properties on Targets
|
||||
/prop_tgt/CXX_EXTENSIONS
|
||||
/prop_tgt/CXX_MODULE_DIRS
|
||||
/prop_tgt/CXX_MODULE_DIRS_NAME
|
||||
/prop_tgt/CXX_MODULE_HEADER_UNIT_DIRS
|
||||
/prop_tgt/CXX_MODULE_HEADER_UNIT_DIRS_NAME
|
||||
/prop_tgt/CXX_MODULE_HEADER_UNIT_SET
|
||||
/prop_tgt/CXX_MODULE_HEADER_UNIT_SET_NAME
|
||||
/prop_tgt/CXX_MODULE_HEADER_UNIT_SETS
|
||||
/prop_tgt/CXX_MODULE_SET
|
||||
/prop_tgt/CXX_MODULE_SET_NAME
|
||||
/prop_tgt/CXX_MODULE_SETS
|
||||
@@ -279,7 +274,6 @@ Properties on Targets
|
||||
/prop_tgt/INTERFACE_COMPILE_DEFINITIONS
|
||||
/prop_tgt/INTERFACE_COMPILE_FEATURES
|
||||
/prop_tgt/INTERFACE_COMPILE_OPTIONS
|
||||
/prop_tgt/INTERFACE_CXX_MODULE_HEADER_UNIT_SETS
|
||||
/prop_tgt/INTERFACE_CXX_MODULE_SETS
|
||||
/prop_tgt/INTERFACE_HEADER_SETS
|
||||
/prop_tgt/INTERFACE_HEADER_SETS_TO_VERIFY
|
||||
|
||||
@@ -15,8 +15,7 @@ consulted.
|
||||
|
||||
Note that scanning is only performed if C++20 or higher is enabled for the
|
||||
target and the source uses the ``CXX`` language. Scanning for modules in
|
||||
sources belonging to file sets of type ``CXX_MODULES`` and
|
||||
``CXX_MODULES_HEADER_UNITS`` is always performed.
|
||||
sources belonging to file sets of type ``CXX_MODULES`` is always performed.
|
||||
|
||||
.. note ::
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
CXX_MODULE_HEADER_UNIT_DIRS
|
||||
---------------------------
|
||||
|
||||
.. versionadded:: 3.25
|
||||
|
||||
.. note ::
|
||||
|
||||
Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
||||
|
||||
Semicolon-separated list of base directories of the target's default C++
|
||||
module header set (i.e. the file set with name and type
|
||||
``CXX_MODULE_HEADER_UNITS``). The property supports
|
||||
:manual:`generator expressions <cmake-generator-expressions(7)>`.
|
||||
|
||||
This property is normally only set by :command:`target_sources(FILE_SET)`
|
||||
rather than being manipulated directly.
|
||||
|
||||
See :prop_tgt:`CXX_MODULE_HEADER_UNIT_DIRS_<NAME>` for the list of base
|
||||
directories in other C++ module header sets.
|
||||
@@ -1,21 +0,0 @@
|
||||
CXX_MODULE_HEADER_UNIT_DIRS_<NAME>
|
||||
----------------------------------
|
||||
|
||||
.. versionadded:: 3.25
|
||||
|
||||
.. note ::
|
||||
|
||||
Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
||||
|
||||
Semicolon-separated list of base directories of the target's ``<NAME>`` C++
|
||||
module header set, which has the set type ``CXX_MODULE_HEADER_UNITS``. The
|
||||
property supports
|
||||
:manual:`generator expressions <cmake-generator-expressions(7)>`.
|
||||
|
||||
This property is normally only set by :command:`target_sources(FILE_SET)`
|
||||
rather than being manipulated directly.
|
||||
|
||||
See :prop_tgt:`CXX_MODULE_HEADER_UNIT_DIRS` for the list of base directories
|
||||
in the default C++ module header set. See
|
||||
:prop_tgt:`CXX_MODULE_HEADER_UNIT_SETS` for the file set names of all C++
|
||||
module header sets.
|
||||
@@ -1,20 +0,0 @@
|
||||
CXX_MODULE_HEADER_UNIT_SET
|
||||
--------------------------
|
||||
|
||||
.. versionadded:: 3.25
|
||||
|
||||
.. note ::
|
||||
|
||||
Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
||||
|
||||
Semicolon-separated list of files in the target's default C++ module header
|
||||
set, (i.e. the file set with name and type ``CXX_MODULE_HEADER_UNITS``). If
|
||||
any of the paths are relative, they are computed relative to the target's
|
||||
source directory. The property supports
|
||||
:manual:`generator expressions <cmake-generator-expressions(7)>`.
|
||||
|
||||
This property is normally only set by :command:`target_sources(FILE_SET)`
|
||||
rather than being manipulated directly.
|
||||
|
||||
See :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET_<NAME>` for the list of files in
|
||||
other C++ module header sets.
|
||||
@@ -1,20 +0,0 @@
|
||||
CXX_MODULE_HEADER_UNIT_SETS
|
||||
---------------------------
|
||||
|
||||
.. versionadded:: 3.25
|
||||
|
||||
.. note ::
|
||||
|
||||
Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
||||
|
||||
Read-only list of the target's ``PRIVATE`` and ``PUBLIC`` C++ module header
|
||||
sets (i.e. all file sets with the type ``CXX_MODULE_HEADER_UNITS``). Files
|
||||
listed in these file sets are treated as source files for the purpose of IDE
|
||||
integration.
|
||||
|
||||
C++ module header sets may be defined using the :command:`target_sources`
|
||||
command ``FILE_SET`` option with type ``CXX_MODULE_HEADER_UNITS``.
|
||||
|
||||
See also :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET_<NAME>`,
|
||||
:prop_tgt:`CXX_MODULE_HEADER_UNIT_SET` and
|
||||
:prop_tgt:`INTERFACE_CXX_MODULE_HEADER_UNIT_SETS`.
|
||||
@@ -1,21 +0,0 @@
|
||||
CXX_MODULE_HEADER_UNIT_SET_<NAME>
|
||||
---------------------------------
|
||||
|
||||
.. versionadded:: 3.25
|
||||
|
||||
.. note ::
|
||||
|
||||
Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
||||
|
||||
Semicolon-separated list of files in the target's ``<NAME>`` C++ module header
|
||||
set, which has the set type ``CXX_MODULE_HEADER_UNITS``. If any of the paths
|
||||
are relative, they are computed relative to the target's source directory. The
|
||||
property supports
|
||||
:manual:`generator expressions <cmake-generator-expressions(7)>`.
|
||||
|
||||
This property is normally only set by :command:`target_sources(FILE_SET)`
|
||||
rather than being manipulated directly.
|
||||
|
||||
See :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET` for the list of files in the
|
||||
default C++ module header set. See :prop_tgt:`CXX_MODULE_HEADER_UNIT_SETS` for
|
||||
the file set names of all C++ module header sets.
|
||||
@@ -19,7 +19,7 @@ scan the target's ``CXX`` sources at build time.
|
||||
|
||||
Note that scanning is only performed if C++20 or higher is enabled for the
|
||||
target. Scanning for modules in the target's sources belonging to file sets
|
||||
of type ``CXX_MODULES`` and ``CXX_MODULES_HEADER_UNITS`` is always performed.
|
||||
of type ``CXX_MODULES`` is always performed.
|
||||
|
||||
.. note ::
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
INTERFACE_CXX_MODULE_HEADER_UNIT_SETS
|
||||
-------------------------------------
|
||||
|
||||
.. versionadded:: 3.25
|
||||
|
||||
.. note ::
|
||||
|
||||
Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
||||
|
||||
Read-only list of the target's ``PUBLIC`` C++ module header sets (i.e. all
|
||||
file sets with the type ``CXX_MODULE_HEADER_UNITS``). Files listed in these
|
||||
C++ module header sets can be installed with :command:`install(TARGETS)` and
|
||||
exported with :command:`install(EXPORT)` and :command:`export`.
|
||||
|
||||
C++ module header sets may be defined using the :command:`target_sources`
|
||||
command ``FILE_SET`` option with type ``CXX_MODULE_HEADER_UNITS``.
|
||||
|
||||
See also :prop_tgt:`CXX_MODULE_HEADER_UNIT_SETS`.
|
||||
@@ -306,18 +306,12 @@ std::shared_ptr<cmDebuggerVariables> cmDebuggerVariablesHelper::CreateIfAny(
|
||||
targetVariables->AddSubVariables(
|
||||
CreateIfAny(variablesManager, "CompileOptions", supportsVariableType,
|
||||
target->GetCompileOptionsEntries()));
|
||||
targetVariables->AddSubVariables(CreateIfAny(
|
||||
variablesManager, "CxxModuleHeaderSets", supportsVariableType,
|
||||
target->GetCxxModuleHeaderSetsEntries()));
|
||||
targetVariables->AddSubVariables(
|
||||
CreateIfAny(variablesManager, "CxxModuleSets", supportsVariableType,
|
||||
target->GetCxxModuleSetsEntries()));
|
||||
targetVariables->AddSubVariables(
|
||||
CreateIfAny(variablesManager, "HeaderSets", supportsVariableType,
|
||||
target->GetHeaderSetsEntries()));
|
||||
targetVariables->AddSubVariables(CreateIfAny(
|
||||
variablesManager, "InterfaceCxxModuleHeaderSets", supportsVariableType,
|
||||
target->GetInterfaceCxxModuleHeaderSetsEntries()));
|
||||
targetVariables->AddSubVariables(CreateIfAny(
|
||||
variablesManager, "InterfaceHeaderSets", supportsVariableType,
|
||||
target->GetInterfaceHeaderSetsEntries()));
|
||||
|
||||
@@ -399,8 +399,7 @@ std::string cmExportBuildFileGenerator::GetFileSetDirectories(
|
||||
auto const& type = fileSet->GetType();
|
||||
// C++ modules do not support interface file sets which are dependent upon
|
||||
// the configuration.
|
||||
if (contextSensitive &&
|
||||
(type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s)) {
|
||||
if (contextSensitive && type == "CXX_MODULES"_s) {
|
||||
auto* mf = this->LG->GetMakefile();
|
||||
std::ostringstream e;
|
||||
e << "The \"" << gte->GetName() << "\" target's interface file set \""
|
||||
@@ -459,8 +458,7 @@ std::string cmExportBuildFileGenerator::GetFileSetFiles(cmGeneratorTarget* gte,
|
||||
auto const& type = fileSet->GetType();
|
||||
// C++ modules do not support interface file sets which are dependent upon
|
||||
// the configuration.
|
||||
if (contextSensitive &&
|
||||
(type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s)) {
|
||||
if (contextSensitive && type == "CXX_MODULES"_s) {
|
||||
auto* mf = this->LG->GetMakefile();
|
||||
std::ostringstream e;
|
||||
e << "The \"" << gte->GetName() << "\" target's interface file set \""
|
||||
|
||||
@@ -598,8 +598,7 @@ std::string cmExportInstallFileGenerator::GetFileSetDirectories(
|
||||
auto const& type = fileSet->GetType();
|
||||
// C++ modules do not support interface file sets which are dependent upon
|
||||
// the configuration.
|
||||
if (cge->GetHadContextSensitiveCondition() &&
|
||||
(type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s)) {
|
||||
if (cge->GetHadContextSensitiveCondition() && type == "CXX_MODULES"_s) {
|
||||
auto* mf = this->IEGen->GetLocalGenerator()->GetMakefile();
|
||||
std::ostringstream e;
|
||||
e << "The \"" << gte->GetName() << "\" target's interface file set \""
|
||||
@@ -661,8 +660,7 @@ std::string cmExportInstallFileGenerator::GetFileSetFiles(
|
||||
auto const& type = fileSet->GetType();
|
||||
// C++ modules do not support interface file sets which are dependent upon
|
||||
// the configuration.
|
||||
if (contextSensitive &&
|
||||
(type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s)) {
|
||||
if (contextSensitive && type == "CXX_MODULES"_s) {
|
||||
auto* mf = this->IEGen->GetLocalGenerator()->GetMakefile();
|
||||
std::ostringstream e;
|
||||
e << "The \"" << gte->GetName() << "\" target's interface file set \""
|
||||
|
||||
@@ -1204,12 +1204,11 @@ bool cmGeneratorTarget::IsInBuildSystem() const
|
||||
case cmStateEnums::GLOBAL_TARGET:
|
||||
return true;
|
||||
case cmStateEnums::INTERFACE_LIBRARY:
|
||||
// An INTERFACE library is in the build system if it has SOURCES,
|
||||
// HEADER_SETS, or C++ module filesets.
|
||||
// An INTERFACE library is in the build system if it has SOURCES
|
||||
// or C++ module filesets.
|
||||
if (!this->SourceEntries.empty() ||
|
||||
!this->Target->GetHeaderSetsEntries().empty() ||
|
||||
!this->Target->GetCxxModuleSetsEntries().empty() ||
|
||||
!this->Target->GetCxxModuleHeaderSetsEntries().empty()) {
|
||||
!this->Target->GetCxxModuleSetsEntries().empty()) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
@@ -1645,8 +1644,7 @@ void addFileSetEntry(cmGeneratorTarget const* headTarget,
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (fileSet->GetType() == "HEADERS"_s ||
|
||||
fileSet->GetType() == "CXX_MODULE_HEADER_UNITS"_s) {
|
||||
if (fileSet->GetType() == "HEADERS"_s) {
|
||||
headTarget->Makefile->GetOrCreateSourceGroup("Header Files")
|
||||
->AddGroupFile(path);
|
||||
}
|
||||
@@ -1673,14 +1671,6 @@ void AddFileSetEntries(cmGeneratorTarget const* headTarget,
|
||||
addFileSetEntry(headTarget, config, dagChecker, cxxModuleSet, entries);
|
||||
}
|
||||
}
|
||||
for (auto const& entry :
|
||||
headTarget->Target->GetCxxModuleHeaderSetsEntries()) {
|
||||
for (auto const& name : cmList{ entry.Value }) {
|
||||
auto const* cxxModuleHeaderSet = headTarget->Target->GetFileSet(name);
|
||||
addFileSetEntry(headTarget, config, dagChecker, cxxModuleHeaderSet,
|
||||
entries);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool processSources(cmGeneratorTarget const* tgt,
|
||||
@@ -8894,8 +8884,7 @@ bool cmGeneratorTarget::HaveCxx20ModuleSources() const
|
||||
}
|
||||
|
||||
auto const& fs_type = file_set->GetType();
|
||||
return fs_type == "CXX_MODULES"_s ||
|
||||
fs_type == "CXX_MODULE_HEADER_UNITS"_s;
|
||||
return fs_type == "CXX_MODULES"_s;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8998,9 +8987,7 @@ bool cmGeneratorTarget::NeedDyndepForSource(std::string const& lang,
|
||||
return false;
|
||||
}
|
||||
auto const* fs = this->GetFileSetForSource(config, sf);
|
||||
if (fs &&
|
||||
(fs->GetType() == "CXX_MODULES"_s ||
|
||||
fs->GetType() == "CXX_MODULE_HEADER_UNITS"_s)) {
|
||||
if (fs && fs->GetType() == "CXX_MODULES"_s) {
|
||||
return true;
|
||||
}
|
||||
auto const sfProp = sf->GetProperty("CXX_SCAN_FOR_MODULES");
|
||||
|
||||
@@ -367,8 +367,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
|
||||
auto const it = file_set_map.find(path);
|
||||
if (it != file_set_map.end()) {
|
||||
auto const& file_set_type = it->second;
|
||||
if (file_set_type == "CXX_MODULES"_s ||
|
||||
file_set_type == "CXX_MODULE_HEADER_UNITS"_s) {
|
||||
if (file_set_type == "CXX_MODULES"_s) {
|
||||
if (sf->GetLanguage() != "CXX"_s) {
|
||||
this->Makefile->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
|
||||
@@ -239,9 +239,7 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject(
|
||||
}
|
||||
|
||||
auto const* fs = this->GeneratorTarget->GetFileSetForSource(config, source);
|
||||
if (fs &&
|
||||
(fs->GetType() == "CXX_MODULES"_s ||
|
||||
fs->GetType() == "CXX_MODULE_HEADER_UNITS"_s)) {
|
||||
if (fs && fs->GetType() == "CXX_MODULES"_s) {
|
||||
if (source->GetLanguage() != "CXX"_s) {
|
||||
this->GetMakefile()->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
|
||||
@@ -675,7 +675,6 @@ public:
|
||||
|
||||
FileSetType HeadersFileSets;
|
||||
FileSetType CxxModulesFileSets;
|
||||
FileSetType CxxModuleHeadersFileSets;
|
||||
|
||||
cmTargetInternals();
|
||||
|
||||
@@ -734,13 +733,6 @@ cmTargetInternals::cmTargetInternals()
|
||||
"The default C++ module set"_s, "C++ module set"_s,
|
||||
FileSetEntries("CXX_MODULE_SETS"_s),
|
||||
FileSetEntries("INTERFACE_CXX_MODULE_SETS"_s))
|
||||
, CxxModuleHeadersFileSets(
|
||||
"CXX_MODULE_HEADER_UNITS"_s, "CXX_MODULE_HEADER_UNIT_DIRS"_s,
|
||||
"CXX_MODULE_HEADER_UNIT_SET"_s, "CXX_MODULE_HEADER_UNIT_DIRS_"_s,
|
||||
"CXX_MODULE_HEADER_UNIT_SET_"_s, "C++ module header"_s,
|
||||
"The default C++ module header set"_s, "C++ module header set"_s,
|
||||
FileSetEntries("CXX_MODULE_HEADER_UNIT_SETS"_s),
|
||||
FileSetEntries("INTERFACE_CXX_MODULE_HEADER_UNIT_SETS"_s))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1751,11 +1743,6 @@ cmBTStringRange cmTarget::GetCxxModuleSetsEntries() const
|
||||
return cmMakeRange(this->impl->CxxModulesFileSets.SelfEntries.Entries);
|
||||
}
|
||||
|
||||
cmBTStringRange cmTarget::GetCxxModuleHeaderSetsEntries() const
|
||||
{
|
||||
return cmMakeRange(this->impl->CxxModuleHeadersFileSets.SelfEntries.Entries);
|
||||
}
|
||||
|
||||
cmBTStringRange cmTarget::GetInterfaceHeaderSetsEntries() const
|
||||
{
|
||||
return cmMakeRange(this->impl->HeadersFileSets.InterfaceEntries.Entries);
|
||||
@@ -1766,12 +1753,6 @@ cmBTStringRange cmTarget::GetInterfaceCxxModuleSetsEntries() const
|
||||
return cmMakeRange(this->impl->CxxModulesFileSets.InterfaceEntries.Entries);
|
||||
}
|
||||
|
||||
cmBTStringRange cmTarget::GetInterfaceCxxModuleHeaderSetsEntries() const
|
||||
{
|
||||
return cmMakeRange(
|
||||
this->impl->CxxModuleHeadersFileSets.InterfaceEntries.Entries);
|
||||
}
|
||||
|
||||
namespace {
|
||||
#define MAKE_PROP(PROP) const std::string prop##PROP = #PROP
|
||||
MAKE_PROP(C_STANDARD);
|
||||
@@ -1875,7 +1856,6 @@ void cmTarget::SetProperty(const std::string& prop, cmValue value)
|
||||
FileSetType* fileSetTypes[] = {
|
||||
&this->impl->HeadersFileSets,
|
||||
&this->impl->CxxModulesFileSets,
|
||||
&this->impl->CxxModuleHeadersFileSets,
|
||||
};
|
||||
|
||||
for (auto* fileSetType : fileSetTypes) {
|
||||
@@ -2049,7 +2029,6 @@ void cmTarget::AppendProperty(const std::string& prop,
|
||||
FileSetType* fileSetTypes[] = {
|
||||
&this->impl->HeadersFileSets,
|
||||
&this->impl->CxxModulesFileSets,
|
||||
&this->impl->CxxModuleHeadersFileSets,
|
||||
};
|
||||
|
||||
for (auto* fileSetType : fileSetTypes) {
|
||||
@@ -2545,7 +2524,6 @@ cmValue cmTarget::GetProperty(const std::string& prop) const
|
||||
FileSetType* fileSetTypes[] = {
|
||||
&this->impl->HeadersFileSets,
|
||||
&this->impl->CxxModulesFileSets,
|
||||
&this->impl->CxxModuleHeadersFileSets,
|
||||
};
|
||||
|
||||
for (auto* fileSetType : fileSetTypes) {
|
||||
@@ -2891,9 +2869,6 @@ std::pair<cmFileSet*, bool> cmTarget::GetOrCreateFileSet(
|
||||
this->impl->HeadersFileSets.AddFileSet(name, vis, std::move(bt));
|
||||
} else if (type == this->impl->CxxModulesFileSets.TypeName) {
|
||||
this->impl->CxxModulesFileSets.AddFileSet(name, vis, std::move(bt));
|
||||
} else if (type == this->impl->CxxModuleHeadersFileSets.TypeName) {
|
||||
this->impl->CxxModuleHeadersFileSets.AddFileSet(name, vis,
|
||||
std::move(bt));
|
||||
}
|
||||
}
|
||||
return std::make_pair(&result.first->second, result.second);
|
||||
@@ -2907,9 +2882,6 @@ std::string cmTarget::GetFileSetsPropertyName(const std::string& type)
|
||||
if (type == "CXX_MODULES") {
|
||||
return "CXX_MODULE_SETS";
|
||||
}
|
||||
if (type == "CXX_MODULE_HEADER_UNITS") {
|
||||
return "CXX_MODULE_HEADER_UNIT_SETS";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -2921,9 +2893,6 @@ std::string cmTarget::GetInterfaceFileSetsPropertyName(const std::string& type)
|
||||
if (type == "CXX_MODULES") {
|
||||
return "INTERFACE_CXX_MODULE_SETS";
|
||||
}
|
||||
if (type == "CXX_MODULE_HEADER_UNITS") {
|
||||
return "INTERFACE_CXX_MODULE_HEADER_UNIT_SETS";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -2952,7 +2921,6 @@ std::vector<std::string> cmTarget::GetAllInterfaceFileSets() const
|
||||
|
||||
appendEntries(this->impl->HeadersFileSets.InterfaceEntries.Entries);
|
||||
appendEntries(this->impl->CxxModulesFileSets.InterfaceEntries.Entries);
|
||||
appendEntries(this->impl->CxxModuleHeadersFileSets.InterfaceEntries.Entries);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -296,11 +296,9 @@ public:
|
||||
|
||||
cmBTStringRange GetHeaderSetsEntries() const;
|
||||
cmBTStringRange GetCxxModuleSetsEntries() const;
|
||||
cmBTStringRange GetCxxModuleHeaderSetsEntries() const;
|
||||
|
||||
cmBTStringRange GetInterfaceHeaderSetsEntries() const;
|
||||
cmBTStringRange GetInterfaceCxxModuleSetsEntries() const;
|
||||
cmBTStringRange GetInterfaceCxxModuleHeaderSetsEntries() const;
|
||||
|
||||
std::string ImportedGetFullPath(const std::string& config,
|
||||
cmStateEnums::ArtifactType artifact) const;
|
||||
|
||||
@@ -264,19 +264,18 @@ bool TargetSourcesImpl::HandleOneFileSet(
|
||||
*this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi);
|
||||
|
||||
if (supportCxx20FileSetTypes) {
|
||||
if (type != "HEADERS"_s && type != "CXX_MODULES"_s &&
|
||||
type != "CXX_MODULE_HEADER_UNITS"_s) {
|
||||
if (type != "HEADERS"_s && type != "CXX_MODULES"_s) {
|
||||
this->SetError(
|
||||
R"(File set TYPE may only be "HEADERS", "CXX_MODULES", or "CXX_MODULE_HEADER_UNITS")");
|
||||
R"(File set TYPE may only be "HEADERS" or "CXX_MODULES")");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cmFileSetVisibilityIsForInterface(visibility) &&
|
||||
!cmFileSetVisibilityIsForSelf(visibility) &&
|
||||
!this->Target->IsImported()) {
|
||||
if (type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s) {
|
||||
if (type == "CXX_MODULES"_s) {
|
||||
this->SetError(
|
||||
R"(File set TYPEs "CXX_MODULES" and "CXX_MODULE_HEADER_UNITS" may not have "INTERFACE" visibility)");
|
||||
R"(File set TYPE "CXX_MODULES" may not have "INTERFACE" visibility)");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -320,7 +319,7 @@ bool TargetSourcesImpl::HandleOneFileSet(
|
||||
if (!baseDirectories.empty()) {
|
||||
fileSet.first->AddDirectoryEntry(
|
||||
BT<std::string>(baseDirectories, this->Makefile->GetBacktrace()));
|
||||
if (type == "HEADERS"_s || type == "CXX_MODULE_HEADER_UNITS"_s) {
|
||||
if (type == "HEADERS"_s) {
|
||||
for (auto const& dir : cmList{ baseDirectories }) {
|
||||
auto interfaceDirectoriesGenex =
|
||||
cmStrCat("$<BUILD_INTERFACE:", dir, ">");
|
||||
|
||||
@@ -2797,9 +2797,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
||||
auto const* fs =
|
||||
this->GeneratorTarget->GetFileSetForSource(config, source);
|
||||
const char* compileAsPerConfig = compileAs;
|
||||
if (fs &&
|
||||
(fs->GetType() == "CXX_MODULES"_s ||
|
||||
fs->GetType() == "CXX_MODULE_HEADER_UNITS"_s)) {
|
||||
if (fs && fs->GetType() == "CXX_MODULES"_s) {
|
||||
if (lang == "CXX"_s) {
|
||||
if (fs->GetType() == "CXX_MODULES"_s) {
|
||||
if (shouldScanForModules &&
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
1
|
||||
@@ -1,12 +0,0 @@
|
||||
CMake Warning \(dev\) at FileSetModuleHeaderUnitsInterface.cmake:2 \(target_sources\):
|
||||
CMake's C\+\+ module support is experimental. It is meant only for
|
||||
experimentation and feedback to CMake developers.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:6 \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Error at FileSetModuleHeaderUnitsInterface.cmake:2 \(target_sources\):
|
||||
target_sources File set TYPEs "CXX_MODULES" and "CXX_MODULE_HEADER_UNITS"
|
||||
may not have "INTERFACE" visibility
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:6 \(include\)
|
||||
@@ -1,8 +0,0 @@
|
||||
add_library(module-header)
|
||||
target_sources(module-header
|
||||
INTERFACE
|
||||
FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
|
||||
sources/module-header.h)
|
||||
target_compile_features(module-header
|
||||
PRIVATE
|
||||
cxx_std_20)
|
||||
@@ -1,6 +0,0 @@
|
||||
CMake Warning \(dev\) at FileSetModuleHeaderUnitsInterfaceImported.cmake:2 \(target_sources\):
|
||||
CMake's C\+\+ module support is experimental. It is meant only for
|
||||
experimentation and feedback to CMake developers.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:6 \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
@@ -1,8 +0,0 @@
|
||||
add_library(module-header INTERFACE IMPORTED)
|
||||
target_sources(module-header
|
||||
INTERFACE
|
||||
FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
|
||||
sources/module-header.h)
|
||||
target_compile_features(module-header
|
||||
INTERFACE
|
||||
cxx_std_20)
|
||||
@@ -1,11 +0,0 @@
|
||||
CMake Warning \(dev\) at FileSetModuleHeaderUnitsPrivate.cmake:7 \(target_sources\):
|
||||
CMake's C\+\+ module support is experimental. It is meant only for
|
||||
experimentation and feedback to CMake developers.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:6 \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Warning \(dev\):
|
||||
C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is
|
||||
experimental. It is meant only for compiler developers to try.
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
@@ -1,13 +0,0 @@
|
||||
enable_language(CXX)
|
||||
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
|
||||
set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "")
|
||||
|
||||
add_library(module-header
|
||||
sources/cxx-anchor.cxx)
|
||||
target_sources(module-header
|
||||
PRIVATE
|
||||
FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
|
||||
sources/module-header.h)
|
||||
target_compile_features(module-header
|
||||
PRIVATE
|
||||
cxx_std_20)
|
||||
@@ -1,11 +0,0 @@
|
||||
CMake Warning \(dev\) at FileSetModuleHeaderUnitsPublic.cmake:7 \(target_sources\):
|
||||
CMake's C\+\+ module support is experimental. It is meant only for
|
||||
experimentation and feedback to CMake developers.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:6 \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Warning \(dev\):
|
||||
C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is
|
||||
experimental. It is meant only for compiler developers to try.
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
@@ -1,13 +0,0 @@
|
||||
enable_language(CXX)
|
||||
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
|
||||
set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "")
|
||||
|
||||
add_library(module-header
|
||||
sources/cxx-anchor.cxx)
|
||||
target_sources(module-header
|
||||
PUBLIC
|
||||
FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
|
||||
sources/module-header.h)
|
||||
target_compile_features(module-header
|
||||
PRIVATE
|
||||
cxx_std_20)
|
||||
@@ -6,7 +6,7 @@ Call Stack \(most recent call first\):
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Error at FileSetModulesInterface.cmake:2 \(target_sources\):
|
||||
target_sources File set TYPEs "CXX_MODULES" and "CXX_MODULE_HEADER_UNITS"
|
||||
may not have "INTERFACE" visibility
|
||||
target_sources File set TYPE "CXX_MODULES" may not have "INTERFACE"
|
||||
visibility
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:6 \(include\)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
1
|
||||
@@ -1,22 +0,0 @@
|
||||
CMake Warning \(dev\) at NotCXXSourceModuleHeaderUnits.cmake:7 \(target_sources\):
|
||||
CMake's C\+\+ module support is experimental. It is meant only for
|
||||
experimentation and feedback to CMake developers.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:6 \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Warning \(dev\):
|
||||
C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is
|
||||
experimental. It is meant only for compiler developers to try.
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Error in CMakeLists.txt:
|
||||
Target "not-cxx-source" contains the source
|
||||
|
||||
.*/Tests/RunCMake/CXXModules/sources/c-anchor.c
|
||||
|
||||
in a file set of type "CXX_MODULE_HEADER_UNITS" but the source is not
|
||||
classified as a "CXX" source.
|
||||
|
||||
|
||||
CMake Generate step failed. Build files cannot be regenerated correctly.
|
||||
@@ -1,15 +0,0 @@
|
||||
enable_language(C)
|
||||
enable_language(CXX)
|
||||
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
|
||||
set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "")
|
||||
|
||||
add_library(not-cxx-source)
|
||||
target_sources(not-cxx-source
|
||||
PRIVATE
|
||||
sources/cxx-anchor.cxx
|
||||
PUBLIC
|
||||
FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
|
||||
sources/c-anchor.c)
|
||||
target_compile_features(not-cxx-source
|
||||
PRIVATE
|
||||
cxx_std_20)
|
||||
@@ -60,8 +60,7 @@ if (NOT generator_supports_cxx_modules)
|
||||
endif ()
|
||||
|
||||
set(fileset_types
|
||||
Modules
|
||||
ModuleHeaderUnits)
|
||||
Modules)
|
||||
set(scopes
|
||||
Interface
|
||||
Private
|
||||
|
||||
@@ -6,7 +6,6 @@ Call Stack \(most recent call first\):
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Error at FileSetDefaultWrongTypeExperimental\.cmake:[0-9]+ \(target_sources\):
|
||||
target_sources File set TYPE may only be "HEADERS", "CXX_MODULES", or
|
||||
"CXX_MODULE_HEADER_UNITS"
|
||||
target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES"
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
|
||||
@@ -6,7 +6,6 @@ Call Stack \(most recent call first\):
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Error at FileSetWrongTypeExperimental\.cmake:[0-9]+ \(target_sources\):
|
||||
target_sources File set TYPE may only be "HEADERS", "CXX_MODULES", or
|
||||
"CXX_MODULE_HEADER_UNITS"
|
||||
target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES"
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
|
||||
Reference in New Issue
Block a user