diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3353fbd..2b73e6f 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4597,15 +4597,25 @@ std::string cmTarget::GetOutputName(const std::string& config, // OUTPUT_NAME props.push_back("OUTPUT_NAME"); + std::string outName; for(std::vector<std::string>::const_iterator i = props.begin(); i != props.end(); ++i) { - if(const char* outName = this->GetProperty(*i)) + if (const char* outNameProp = this->GetProperty(*i)) { - return outName; + outName = outNameProp; + break; } } - return this->GetName(); + + if (outName.empty()) + { + outName = this->GetName(); + } + + cmGeneratorExpression ge; + cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(outName); + return cge->Evaluate(this->Makefile, config); } //---------------------------------------------------------------------------- |