diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-13 08:44:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-15 19:36:21 (GMT) |
commit | cfd4f0a4f49da41330f648a665b24cb507829ede (patch) | |
tree | 9bba35620b54fed328d60653435febe7dbba7f6e /Source/cmExportInstallFileGenerator.cxx | |
parent | d8fe1fcd800e622209fdb84f1302822e8bee5a77 (diff) | |
download | CMake-cfd4f0a4f49da41330f648a665b24cb507829ede.zip CMake-cfd4f0a4f49da41330f648a665b24cb507829ede.tar.gz CMake-cfd4f0a4f49da41330f648a665b24cb507829ede.tar.bz2 |
Move the exported check for dependencies of targets
Check only once, in the Config.cmake file, instead of once in each
Config-<cfg>.cmake file.
Diffstat (limited to 'Source/cmExportInstallFileGenerator.cxx')
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 68881a1..bffa2b6 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -93,7 +93,6 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) this->GenerateInterfaceProperties(te, os, properties); } - this->GenerateMissingTargetsCheckCode(os, missingTargets); // Now load per-configuration properties for them. os << "# Load information for each installed configuration.\n" @@ -111,17 +110,21 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) ci = this->Configurations.begin(); ci != this->Configurations.end(); ++ci) { - if(!this->GenerateImportFileConfig(ci->c_str())) + if(!this->GenerateImportFileConfig(ci->c_str(), missingTargets)) { result = false; } } + + this->GenerateMissingTargetsCheckCode(os, missingTargets); + return result; } //---------------------------------------------------------------------------- bool -cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config) +cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config, + std::vector<std::string> &missingTargets) { // Skip configurations not enabled for this export. if(!this->IEGen->InstallsForConfig(config)) @@ -161,7 +164,7 @@ cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config) this->GenerateImportHeaderCode(os, config); // Generate the per-config target information. - this->GenerateImportConfig(os, config); + this->GenerateImportConfig(os, config, missingTargets); // End with the import file footer. this->GenerateImportFooterCode(os); @@ -176,7 +179,8 @@ cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config) void cmExportInstallFileGenerator ::GenerateImportTargetsConfig(std::ostream& os, - const char* config, std::string const& suffix) + const char* config, std::string const& suffix, + std::vector<std::string> &missingTargets) { // Add code to compute the installation prefix relative to the // import file location. @@ -225,7 +229,6 @@ cmExportInstallFileGenerator if(!properties.empty()) { // Get the rest of the target details. - std::vector<std::string> missingTargets; this->SetImportDetailProperties(config, suffix, te->Target, properties, missingTargets); @@ -240,7 +243,6 @@ cmExportInstallFileGenerator // properties); // Generate code in the export file. - this->GenerateMissingTargetsCheckCode(os, missingTargets); this->GenerateImportPropertyCode(os, config, te->Target, properties); this->GenerateImportedFileChecksCode(os, te->Target, properties, importedLocations); |