summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-24 16:19:24 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-24 16:26:52 (GMT)
commitfeff52d42ca18a52fd99e8fdfd3093c3a94eb498 (patch)
tree8c7eb9ac81a2af590efcc63de5a5aecbfdb9bbdb /Source
parent6cbad490c2fdbd9bdc67b406b9f2dcdc21e08ddb (diff)
downloadCMake-feff52d42ca18a52fd99e8fdfd3093c3a94eb498.zip
CMake-feff52d42ca18a52fd99e8fdfd3093c3a94eb498.tar.gz
CMake-feff52d42ca18a52fd99e8fdfd3093c3a94eb498.tar.bz2
Fix COMPILE_PDB_NAME when used on an OBJECT library
When `COMPILE_PDB_NAME` is used without `COMPILE_PDB_OUTPUT_DIRECTORY` we cannot fall back on the link `PDB_OUTPUT_DIRECTORY` for an object library because it has no link step. Fixes: #16674
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 6ce8140..3fe5c83 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1147,7 +1147,7 @@ std::string cmGeneratorTarget::GetCompilePDBPath(
{
std::string dir = this->GetCompilePDBDirectory(config);
std::string name = this->GetCompilePDBName(config);
- if (dir.empty() && !name.empty()) {
+ if (dir.empty() && !name.empty() && this->HaveWellDefinedOutputFiles()) {
dir = this->GetPDBDirectory(config);
}
if (!dir.empty()) {