mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 16:18:43 -05:00
cmGeneratorTarget: classify BMI-only C++ module sources
This commit is contained in:
@@ -1678,6 +1678,7 @@ Json::Value Target::DumpSource(cmGeneratorTarget::SourceAndKind const& sk,
|
||||
}
|
||||
|
||||
switch (sk.Kind) {
|
||||
case cmGeneratorTarget::SourceKindCxxModuleSource:
|
||||
case cmGeneratorTarget::SourceKindObjectSource: {
|
||||
source["compileGroupIndex"] =
|
||||
this->AddSourceCompileGroup(sk.Source.Value, si);
|
||||
|
||||
@@ -1071,6 +1071,12 @@ void cmGeneratorTarget::GetHeaderSources(
|
||||
IMPLEMENT_VISIT(SourceKindHeader);
|
||||
}
|
||||
|
||||
void cmGeneratorTarget::GetCxxModuleSources(
|
||||
std::vector<cmSourceFile const*>& data, const std::string& config) const
|
||||
{
|
||||
IMPLEMENT_VISIT(SourceKindCxxModuleSource);
|
||||
}
|
||||
|
||||
void cmGeneratorTarget::GetExtraSources(std::vector<cmSourceFile const*>& data,
|
||||
const std::string& config) const
|
||||
{
|
||||
@@ -1953,8 +1959,12 @@ void cmGeneratorTarget::ComputeKindedSources(KindedSources& files,
|
||||
// Compute the kind (classification) of this source file.
|
||||
SourceKind kind;
|
||||
std::string ext = cmSystemTools::LowerCase(sf->GetExtension());
|
||||
cmFileSet const* fs = this->GetFileSetForSource(config, sf);
|
||||
if (sf->GetCustomCommand()) {
|
||||
kind = SourceKindCustomCommand;
|
||||
} else if (!this->Target->IsNormal() && !this->Target->IsImported() &&
|
||||
fs && (fs->GetType() == "CXX_MODULES"_s)) {
|
||||
kind = SourceKindCxxModuleSource;
|
||||
} else if (this->Target->GetType() == cmStateEnums::UTILITY ||
|
||||
this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY
|
||||
// XXX(clang-tidy): https://bugs.llvm.org/show_bug.cgi?id=44165
|
||||
|
||||
@@ -116,6 +116,7 @@ public:
|
||||
SourceKindCertificate,
|
||||
SourceKindCustomCommand,
|
||||
SourceKindExternalObject,
|
||||
SourceKindCxxModuleSource,
|
||||
SourceKindExtra,
|
||||
SourceKindHeader,
|
||||
SourceKindIDL,
|
||||
@@ -186,6 +187,8 @@ public:
|
||||
const std::string& config) const;
|
||||
void GetHeaderSources(std::vector<cmSourceFile const*>&,
|
||||
const std::string& config) const;
|
||||
void GetCxxModuleSources(std::vector<cmSourceFile const*>&,
|
||||
const std::string& config) const;
|
||||
void GetExtraSources(std::vector<cmSourceFile const*>&,
|
||||
const std::string& config) const;
|
||||
void GetCustomCommands(std::vector<cmSourceFile const*>&,
|
||||
|
||||
@@ -2517,6 +2517,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
|
||||
case cmGeneratorTarget::SourceKindModuleDefinition:
|
||||
tool = "None";
|
||||
break;
|
||||
case cmGeneratorTarget::SourceKindCxxModuleSource:
|
||||
case cmGeneratorTarget::SourceKindUnityBatched:
|
||||
case cmGeneratorTarget::SourceKindObjectSource: {
|
||||
const std::string& lang = si.Source->GetLanguage();
|
||||
|
||||
Reference in New Issue
Block a user