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

Method GenerateScript

Source/cmInstallExportGenerator.cxx:76–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void cmInstallExportGenerator::GenerateScript(std::ostream& os)
77{
78 // Skip empty sets.
79 if (this->ExportSet->GetTargetExports().empty()) {
80 std::ostringstream e;
81 e << "INSTALL(" << this->InstallSubcommand() << ") given unknown export \""
82 << this->ExportSet->GetName() << "\"";
83 cmSystemTools::Error(e.str());
84 return;
85 }
86
87 // Create the temporary directory in which to store the files.
88 this->ComputeTempDir();
89 cmSystemTools::MakeDirectory(this->TempDir);
90
91 // Construct a temporary location for the file.
92 this->MainImportFile = cmStrCat(this->TempDir, '/', this->FileName);
93
94 // Generate the import file for this export set.
95 this->EFGen->SetExportFile(this->MainImportFile.c_str());
96 this->EFGen->SetNamespace(this->Namespace);
97 if (this->ConfigurationTypes->empty()) {
98 if (!this->ConfigurationName.empty()) {
99 this->EFGen->AddConfiguration(this->ConfigurationName);
100 } else {
101 this->EFGen->AddConfiguration("");
102 }
103 } else {
104 for (std::string const& c : *this->ConfigurationTypes) {
105 this->EFGen->AddConfiguration(c);
106 }
107 }
108 this->EFGen->GenerateImportFile();
109
110 // Perform the main install script generation.
111 this->cmInstallGenerator::GenerateScript(os);
112}
113
114void cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os,
115 Indent indent)

Callers

nothing calls this directly

Calls 12

ComputeTempDirMethod · 0.95
strMethod · 0.80
SetExportFileMethod · 0.80
c_strMethod · 0.80
SetNamespaceMethod · 0.80
ErrorClass · 0.70
cmStrCatFunction · 0.70
emptyMethod · 0.45
InstallSubcommandMethod · 0.45
GetNameMethod · 0.45
AddConfigurationMethod · 0.45
GenerateImportFileMethod · 0.45

Tested by

no test coverage detected