diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-02-02 20:54:43 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-08-17 18:42:53 (GMT) |
commit | 159585967a0e4ab99f39de4eec311bac7d0ee0d0 (patch) | |
tree | c85b8a8b0f6bbe22e81ade3b8a8740ced8f45eab /Source/cmGeneratorTarget.cxx | |
parent | 7b069510c5440f0193f1626be5000cf5efe90442 (diff) | |
download | CMake-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.cxx | 10 |
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 |