diff options
author | Marian Klymov <nekto1989@gmail.com> | 2018-05-16 21:19:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-21 15:00:12 (GMT) |
commit | 79ca546ed2d7d0ef546533978dfc4af4023d7194 (patch) | |
tree | 8bef32df5dfbe61af8d4337feb27e67846c3f76e /Source/cmGeneratorTarget.cxx | |
parent | acb97101628d900aca9bfc869f168c1f2bd1de30 (diff) | |
download | CMake-79ca546ed2d7d0ef546533978dfc4af4023d7194.zip CMake-79ca546ed2d7d0ef546533978dfc4af4023d7194.tar.gz CMake-79ca546ed2d7d0ef546533978dfc4af4023d7194.tar.bz2 |
Add generator expression support to PDB_OUTPUT_DIRECTORY target property
Fixes: #16365
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 799ae95..0c99ed4 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4612,13 +4612,24 @@ bool cmGeneratorTarget::ComputePDBOutputDir(const std::string& kind, // Select an output directory. if (const char* config_outdir = this->GetProperty(configProp)) { // Use the user-specified per-configuration output directory. - out = config_outdir; + cmGeneratorExpression ge; + std::unique_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(config_outdir); + out = cge->Evaluate(this->LocalGenerator, config); // Skip per-configuration subdirectory. conf.clear(); } else if (const char* outdir = this->GetProperty(propertyName)) { // Use the user-specified output directory. - out = outdir; + cmGeneratorExpression ge; + std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(outdir); + out = cge->Evaluate(this->LocalGenerator, config); + + // Skip per-configuration subdirectory if the value contained a + // generator expression. + if (out != outdir) { + conf.clear(); + } } if (out.empty()) { return false; |