summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-02-02 20:54:43 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-08-17 18:42:53 (GMT)
commit159585967a0e4ab99f39de4eec311bac7d0ee0d0 (patch)
treec85b8a8b0f6bbe22e81ade3b8a8740ced8f45eab /Source/cmGeneratorTarget.cxx
parent7b069510c5440f0193f1626be5000cf5efe90442 (diff)
downloadCMake-159585967a0e4ab99f39de4eec311bac7d0ee0d0.zip
CMake-159585967a0e4ab99f39de4eec311bac7d0ee0d0.tar.gz
CMake-159585967a0e4ab99f39de4eec311bac7d0ee0d0.tar.bz2
cmGeneratorTarget: classify BMI-only C++ module sources
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c6b2718..c15db5b 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -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