mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-20 22:20:50 -06:00
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
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user