diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-05-26 13:34:52 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-05-31 14:57:11 (GMT) |
commit | 6ff5cdc533a7c9281c97c9d22dd9cd3e05494f3a (patch) | |
tree | 109af6d3021aae795af9a6520f65be545c5b2a6d /Source | |
parent | 26240066084b9cbe37956cee4b3be1e75e144ce5 (diff) | |
download | CMake-6ff5cdc533a7c9281c97c9d22dd9cd3e05494f3a.zip CMake-6ff5cdc533a7c9281c97c9d22dd9cd3e05494f3a.tar.gz CMake-6ff5cdc533a7c9281c97c9d22dd9cd3e05494f3a.tar.bz2 |
cxxmodules: remove support for `CXX_MODULE_HEADER_UNITS` filesets
There's no backing implementation for header units anyways, so just
remove it for now.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmDebuggerVariablesHelper.cxx | 6 | ||||
-rw-r--r-- | Source/cmExportBuildFileGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 25 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 3 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 32 | ||||
-rw-r--r-- | Source/cmTarget.h | 2 | ||||
-rw-r--r-- | Source/cmTargetSourcesCommand.cxx | 11 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 4 |
10 files changed, 18 insertions, 81 deletions
diff --git a/Source/cmDebuggerVariablesHelper.cxx b/Source/cmDebuggerVariablesHelper.cxx index 42ce5e7..1322b20 100644 --- a/Source/cmDebuggerVariablesHelper.cxx +++ b/Source/cmDebuggerVariablesHelper.cxx @@ -306,9 +306,6 @@ 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())); @@ -316,9 +313,6 @@ std::shared_ptr<cmDebuggerVariables> cmDebuggerVariablesHelper::CreateIfAny( CreateIfAny(variablesManager, "HeaderSets", supportsVariableType, target->GetHeaderSetsEntries())); targetVariables->AddSubVariables(CreateIfAny( - variablesManager, "InterfaceCxxModuleHeaderSets", supportsVariableType, - target->GetInterfaceCxxModuleHeaderSetsEntries())); - targetVariables->AddSubVariables(CreateIfAny( variablesManager, "InterfaceHeaderSets", supportsVariableType, target->GetInterfaceHeaderSetsEntries())); targetVariables->AddSubVariables( diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index a3637d8..df26bad 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -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 \"" diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index df119ae..538c883 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -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 \"" diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index f8455c8..617730c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -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"); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index c915e26..8099d44 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -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, diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 25e00d3..85733e1 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -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, diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b55554d..4025967 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -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; } diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 5fe5a28..ac6d130 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -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; diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx index cd7ff74..12328b1 100644 --- a/Source/cmTargetSourcesCommand.cxx +++ b/Source/cmTargetSourcesCommand.cxx @@ -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, ">"); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6d62aff..7975018 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -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 && |