diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-05-31 16:03:52 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-05-31 16:03:52 (GMT) |
commit | 66580ab341f44b640346ac16bba02ea21d143b22 (patch) | |
tree | 36f8598a862d2a4e18464561421a7cb827b561fb /Source/cmGetTargetPropertyCommand.cxx | |
parent | 2f07e8e8f8f4890eb489ab43eb111c839235179b (diff) | |
download | CMake-66580ab341f44b640346ac16bba02ea21d143b22.zip CMake-66580ab341f44b640346ac16bba02ea21d143b22.tar.gz CMake-66580ab341f44b640346ac16bba02ea21d143b22.tar.bz2 |
ENH: if get_target_property() doesn't find a target with the given name, it
returns now "<NAME_OF_VAR>-NOTFOUND" instead of just "NOTFOUND", which can help
in finding problems
Alex
Diffstat (limited to 'Source/cmGetTargetPropertyCommand.cxx')
-rw-r--r-- | Source/cmGetTargetPropertyCommand.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index 4174ba6..e0e85bd 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -25,7 +25,7 @@ bool cmGetTargetPropertyCommand::InitialPass( this->SetError("called with incorrect number of arguments"); return false; } - const char* var = args[0].c_str(); + std::string var = args[0].c_str(); const char* targetName = args[1].c_str(); cmTarget *tgt = this->Makefile->GetLocalGenerator()->GetGlobalGenerator() @@ -36,11 +36,11 @@ bool cmGetTargetPropertyCommand::InitialPass( const char *prop = target.GetProperty(args[2].c_str()); if (prop) { - this->Makefile->AddDefinition(var, prop); + this->Makefile->AddDefinition(var.c_str(), prop); return true; } } - this->Makefile->AddDefinition(var, "NOTFOUND"); + this->Makefile->AddDefinition(var.c_str(), (var+"-NOTFOUND").c_str()); return true; } |