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

Method GenerateImportedFileChecksCode

Source/cmExportCMakeConfigGenerator.cxx:573–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573void cmExportCMakeConfigGenerator::GenerateImportedFileChecksCode(
574 std::ostream& os, cmGeneratorTarget const* target,
575 ImportPropertyMap const& properties,
576 std::set<std::string> const& importedLocations,
577 std::string const& importedXcFrameworkLocation)
578{
579 // Construct the imported target name.
580 std::string targetName = cmStrCat(this->Namespace, target->GetExportName());
581
582 os << "list(APPEND _cmake_import_check_targets " << targetName << " )\n";
583 if (!importedXcFrameworkLocation.empty()) {
584 os << "set(_cmake_import_check_xcframework_for_" << targetName << ' '
585 << cmExportFileGeneratorEscape(importedXcFrameworkLocation) << ")\n";
586 }
587 os << "list(APPEND _cmake_import_check_files_for_" << targetName << ' ';
588
589 for (std::string const& li : importedLocations) {
590 auto pi = properties.find(li);
591 if (pi != properties.end()) {
592 os << cmExportFileGeneratorEscape(pi->second) << ' ';
593 }
594 }
595
596 os << ")\n\n";
597}
598
599void cmExportCMakeConfigGenerator::GenerateTargetFileSets(
600 cmGeneratorTarget* gte, std::ostream& os, cmTargetExport const* te)

Callers 1

Calls 6

GetExportNameMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected