summaryrefslogtreecommitdiffstats
path: root/Source/cmExportCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-30 22:25:52 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-30 22:25:52 (GMT)
commit7902bc06aae07a9d4cde81ab41c3c86694d80a9b (patch)
tree20810436488a804ffadb37c349d8db594d368a36 /Source/cmExportCommand.cxx
parent22be36f8d52fae0f509725253f175b0c1ec65dcc (diff)
downloadCMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.zip
CMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.tar.gz
CMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.tar.bz2
ENH: Implemented link-interface specification feature.
- Shared libs and executables with exports may now have explicit transitive link dependencies specified - Created LINK_INTERFACE_LIBRARIES and related properties - Exported targets get the interface libraries as their IMPORTED_LINK_LIBRARIES property. - The export() and install(EXPORT) commands now give an error when a linked target is not included since the user can change the interface libraries instead of adding the target.
Diffstat (limited to 'Source/cmExportCommand.cxx')
-rw-r--r--Source/cmExportCommand.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index cfc339c..ba47637 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -100,12 +100,6 @@ bool cmExportCommand
fname += this->Filename.GetString();
}
- // If no targets are to be exported we are done.
- if(this->Targets.GetVector().empty())
- {
- return true;
- }
-
// Collect the targets to be exported.
std::vector<cmTarget*> targets;
for(std::vector<std::string>::const_iterator
@@ -149,6 +143,7 @@ bool cmExportCommand
ebfg.SetNamespace(this->Namespace.GetCString());
ebfg.SetAppendMode(this->Append.IsEnabled());
ebfg.SetExports(&targets);
+ ebfg.SetCommand(this);
// Compute the set of configurations exported.
if(const char* types =
@@ -180,5 +175,12 @@ bool cmExportCommand
return false;
}
+ // Report generated error message if any.
+ if(!this->ErrorMessage.empty())
+ {
+ this->SetError(this->ErrorMessage.c_str());
+ return false;
+ }
+
return true;
}