diff options
author | Brad King <brad.king@kitware.com> | 2018-05-21 15:02:33 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-05-21 15:02:42 (GMT) |
commit | 7b42ffce09b589b8a7b1af348920e9c4808bd69f (patch) | |
tree | f29f8f8748a7b91c6e5e2bd853d4436c9b47bc42 /Source | |
parent | 963a33f4a86d8dd181446696bb5c64db91276906 (diff) | |
parent | 79ca546ed2d7d0ef546533978dfc4af4023d7194 (diff) | |
download | CMake-7b42ffce09b589b8a7b1af348920e9c4808bd69f.zip CMake-7b42ffce09b589b8a7b1af348920e9c4808bd69f.tar.gz CMake-7b42ffce09b589b8a7b1af348920e9c4808bd69f.tar.bz2 |
Merge topic 'PDBDirectoryGenExpression'
79ca546ed2 Add generator expression support to PDB_OUTPUT_DIRECTORY target property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2083
Diffstat (limited to 'Source')
-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; |