diff options
author | Robert Goulet <robert.goulet@autodesk.com> | 2015-07-08 20:53:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-09 15:48:10 (GMT) |
commit | 809159c9b7f7cfcb2addeaf968ef2dba740c3606 (patch) | |
tree | bf5f5a424df97c4779a3bd23bcc2b9d8c5d1d938 /Source | |
parent | 9a1ef0dcfd5284801033c4915d58a856fbe29625 (diff) | |
download | CMake-809159c9b7f7cfcb2addeaf968ef2dba740c3606.zip CMake-809159c9b7f7cfcb2addeaf968ef2dba740c3606.tar.gz CMake-809159c9b7f7cfcb2addeaf968ef2dba740c3606.tar.bz2 |
Add generator expression support to OUTPUT_NAME target property
Diffstat (limited to 'Source')
-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); } //---------------------------------------------------------------------------- |