diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-02-07 16:49:42 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-02-07 16:49:42 (GMT) |
commit | cbe95dffccb75692fcba71ca3c7835e1b3f286bd (patch) | |
tree | 757e9fdc74ba9b193e05abf0c521e3956585b21c /Source/cmSetTargetPropertiesCommand.cxx | |
parent | f548dc4a06bdac0507cce22b26d5058878de8044 (diff) | |
download | CMake-cbe95dffccb75692fcba71ca3c7835e1b3f286bd.zip CMake-cbe95dffccb75692fcba71ca3c7835e1b3f286bd.tar.gz CMake-cbe95dffccb75692fcba71ca3c7835e1b3f286bd.tar.bz2 |
BUG: fix for bug 4414, find targets in the global generator for set_target_properties and add_dependencies
Diffstat (limited to 'Source/cmSetTargetPropertiesCommand.cxx')
-rw-r--r-- | Source/cmSetTargetPropertiesCommand.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx index f7910a0..342989d 100644 --- a/Source/cmSetTargetPropertiesCommand.cxx +++ b/Source/cmSetTargetPropertiesCommand.cxx @@ -15,6 +15,8 @@ =========================================================================*/ #include "cmSetTargetPropertiesCommand.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" // cmSetTargetPropertiesCommand bool cmSetTargetPropertiesCommand::InitialPass( @@ -93,19 +95,16 @@ bool cmSetTargetPropertiesCommand std::vector<std::string> &propertyPairs, cmMakefile *mf) { - cmTargets& targets = mf->GetTargets(); - - // if the file is already in the makefile just set properites on it - cmTargets::iterator t = targets.find(tname); - if ( t != targets.end()) + cmTarget* target = + mf->GetLocalGenerator()->GetGlobalGenerator()->FindTarget(0, tname); + if ( target) { - cmTarget& target = t->second; // now loop through all the props and set them unsigned int k; for (k = 0; k < propertyPairs.size(); k = k + 2) { - target.SetProperty(propertyPairs[k].c_str(), - propertyPairs[k+1].c_str()); + target->SetProperty(propertyPairs[k].c_str(), + propertyPairs[k+1].c_str()); } } // if file is not already in the makefile, then add it |