summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmExportBuildFileGenerator.cxx11
-rw-r--r--Source/cmExportBuildFileGenerator.h3
-rw-r--r--Source/cmExportFileGenerator.cxx5
-rw-r--r--Source/cmExportFileGenerator.h6
-rw-r--r--Source/cmExportInstallFileGenerator.cxx16
-rw-r--r--Source/cmExportInstallFileGenerator.h6
6 files changed, 27 insertions, 20 deletions
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index 29f67436f0..ad6180311e 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -74,16 +74,16 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
this->GenerateInterfaceProperties(te, os, properties);
}
- this->GenerateMissingTargetsCheckCode(os, missingTargets);
-
// Generate import file content for each configuration.
for(std::vector<std::string>::const_iterator
ci = this->Configurations.begin();
ci != this->Configurations.end(); ++ci)
{
- this->GenerateImportConfig(os, ci->c_str());
+ this->GenerateImportConfig(os, ci->c_str(), missingTargets);
}
+ this->GenerateMissingTargetsCheckCode(os, missingTargets);
+
return true;
}
@@ -91,7 +91,8 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
void
cmExportBuildFileGenerator
::GenerateImportTargetsConfig(std::ostream& os,
- const char* config, std::string const& suffix)
+ const char* config, std::string const& suffix,
+ std::vector<std::string> &missingTargets)
{
for(std::vector<cmTarget*>::const_iterator
tei = this->Exports->begin();
@@ -104,7 +105,6 @@ cmExportBuildFileGenerator
if(!properties.empty())
{
// Get the rest of the target details.
- std::vector<std::string> missingTargets;
this->SetImportDetailProperties(config, suffix,
target, properties, missingTargets);
this->SetImportLinkInterface(config, suffix,
@@ -119,7 +119,6 @@ cmExportBuildFileGenerator
// properties);
// Generate code in the export file.
- this->GenerateMissingTargetsCheckCode(os, missingTargets);
this->GenerateImportPropertyCode(os, config, target, properties);
}
}
diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h
index 726537bfc9..5e1be16480 100644
--- a/Source/cmExportBuildFileGenerator.h
+++ b/Source/cmExportBuildFileGenerator.h
@@ -44,7 +44,8 @@ protected:
virtual bool GenerateMainFile(std::ostream& os);
virtual void GenerateImportTargetsConfig(std::ostream& os,
const char* config,
- std::string const& suffix);
+ std::string const& suffix,
+ std::vector<std::string> &missingTargets);
virtual void HandleMissingTarget(std::string& link_libs,
std::vector<std::string>& missingTargets,
cmMakefile* mf,
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index a2d6961b83..fc78eeb69a 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -107,7 +107,8 @@ bool cmExportFileGenerator::GenerateImportFile()
//----------------------------------------------------------------------------
void cmExportFileGenerator::GenerateImportConfig(std::ostream& os,
- const char* config)
+ const char* config,
+ std::vector<std::string> &missingTargets)
{
// Construct the property configuration suffix.
std::string suffix = "_";
@@ -121,7 +122,7 @@ void cmExportFileGenerator::GenerateImportConfig(std::ostream& os,
}
// Generate the per-config target information.
- this->GenerateImportTargetsConfig(os, config, suffix);
+ this->GenerateImportTargetsConfig(os, config, suffix, missingTargets);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index 4d97a63388..8620dd1c60 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -47,7 +47,8 @@ protected:
// Generate per-configuration target information to the given output
// stream.
- void GenerateImportConfig(std::ostream& os, const char* config);
+ void GenerateImportConfig(std::ostream& os, const char* config,
+ std::vector<std::string> &missingTargets);
// Methods to implement export file code generation.
void GenerateImportHeaderCode(std::ostream& os, const char* config = 0);
@@ -85,7 +86,8 @@ protected:
/** Each subclass knows where the target files are located. */
virtual void GenerateImportTargetsConfig(std::ostream& os,
const char* config,
- std::string const& suffix) = 0;
+ std::string const& suffix,
+ std::vector<std::string> &missingTargets) = 0;
/** Each subclass knows how to deal with a target that is missing from an
* export set. */
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 68881a1681..bffa2b605d 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);
diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h
index e719eccd5b..e1877499d6 100644
--- a/Source/cmExportInstallFileGenerator.h
+++ b/Source/cmExportInstallFileGenerator.h
@@ -56,7 +56,8 @@ protected:
virtual bool GenerateMainFile(std::ostream& os);
virtual void GenerateImportTargetsConfig(std::ostream& os,
const char* config,
- std::string const& suffix);
+ std::string const& suffix,
+ std::vector<std::string> &missingTargets);
virtual void HandleMissingTarget(std::string& link_libs,
std::vector<std::string>& missingTargets,
cmMakefile* mf,
@@ -72,7 +73,8 @@ protected:
/** Generate a per-configuration file for the targets. */
- bool GenerateImportFileConfig(const char* config);
+ bool GenerateImportFileConfig(const char* config,
+ std::vector<std::string> &missingTargets);
/** Fill in properties indicating installed file locations. */
void SetImportLocationProperty(const char* config,