MCPcopy Create free account
hub / github.com/Kitware/CMake / HaveCxx20ModuleSources

Method HaveCxx20ModuleSources

Source/cmGeneratorTarget.cxx:6154–6176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6152}
6153
6154bool cmGeneratorTarget::HaveCxx20ModuleSources(std::string* errorMessage) const
6155{
6156 auto const& fs_names = this->Target->GetAllFileSetNames();
6157 return std::any_of(
6158 fs_names.begin(), fs_names.end(),
6159 [this, errorMessage](std::string const& name) -> bool {
6160 auto const* file_set = this->Target->GetFileSet(name);
6161 if (!file_set) {
6162 auto message = cmStrCat("Target \"", this->Target->GetName(),
6163 "\" is tracked to have file set \"", name,
6164 "\", but it was not found.");
6165 if (errorMessage) {
6166 *errorMessage = std::move(message);
6167 } else {
6168 this->Makefile->IssueMessage(MessageType::INTERNAL_ERROR, message);
6169 }
6170 return false;
6171 }
6172
6173 auto const& fs_type = file_set->GetType();
6174 return fs_type == "CXX_MODULES"_s;
6175 });
6176}
6177
6178cmGeneratorTarget::Cxx20SupportLevel cmGeneratorTarget::HaveCxxModuleSupport(
6179 std::string const& config) const

Calls 9

moveFunction · 0.85
GetAllFileSetNamesMethod · 0.80
cmStrCatFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
GetFileSetMethod · 0.45
GetNameMethod · 0.45
IssueMessageMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected