summaryrefslogtreecommitdiff
path: root/Source/cmExportBuildFileGenerator.cxx
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
commitef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (patch)
tree6501b44707b5c6a88fa5f817adee1a3ffcb0012d /Source/cmExportBuildFileGenerator.cxx
parent035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (diff)
downloadcmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.gz
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.bz2
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.zip
Imported Upstream version 2.8.10.2upstream/2.8.10.2
Diffstat (limited to 'Source/cmExportBuildFileGenerator.cxx')
-rw-r--r--Source/cmExportBuildFileGenerator.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index 32595ee4b..fb3f39fe6 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -72,8 +72,9 @@ cmExportBuildFileGenerator
if(!properties.empty())
{
// Get the rest of the target details.
+ std::vector<std::string> missingTargets;
this->SetImportDetailProperties(config, suffix,
- target, properties);
+ target, properties, missingTargets);
// TOOD: PUBLIC_HEADER_LOCATION
// This should wait until the build feature propagation stuff
@@ -82,6 +83,7 @@ cmExportBuildFileGenerator
// properties);
// Generate code in the export file.
+ this->GenerateMissingTargetsCheckCode(os, missingTargets);
this->GenerateImportPropertyCode(os, config, target, properties);
}
}
@@ -133,6 +135,25 @@ cmExportBuildFileGenerator
//----------------------------------------------------------------------------
void
+cmExportBuildFileGenerator::HandleMissingTarget(
+ std::string& link_libs, std::vector<std::string>&,
+ cmMakefile*, cmTarget* depender, cmTarget* dependee)
+{
+ // The target is not in the export.
+ if(!this->AppendMode)
+ {
+ // We are not appending, so all exported targets should be
+ // known here. This is probably user-error.
+ this->ComplainAboutMissingTarget(depender, dependee);
+ }
+ // Assume the target will be exported by another command.
+ // Append it with the export namespace.
+ link_libs += this->Namespace;
+ link_libs += dependee->GetName();
+}
+
+//----------------------------------------------------------------------------
+void
cmExportBuildFileGenerator
::ComplainAboutMissingTarget(cmTarget* depender,
cmTarget* dependee)