diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index db55274854..ed61993efe 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -4182,8 +4182,7 @@ struct TargetOutputNameArtifactResultGetter return std::string(); } - return target->GetPDBOutputName(context->Config) + - target->GetFilePostfix(context->Config); + return target->GetPDBOutputName(context->Config); } }; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 99ee0ec16c..43ab2d3a36 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3772,7 +3772,8 @@ std::string cmGeneratorTarget::GetPDBOutputName( std::string const& config) const { std::string base = - this->GetOutputName(config, cmStateEnums::RuntimeBinaryArtifact); + this->GetOutputName(config, cmStateEnums::RuntimeBinaryArtifact) + + this->GetFilePostfix(config); std::vector props; std::string configUpper = cmSystemTools::UpperCase(config); diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake index d550431e1e..a401745d1f 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake @@ -122,8 +122,8 @@ check_value ("TARGET_LINKER_FILE_BASE_NAME static linker all properties + postfi ]]) if (CMAKE_C_LINKER_SUPPORTS_PDB) string (APPEND GENERATE_CONTENT [[ -check_value ("TARGET_PDB_FILE_BASE_NAME executable PDB all properties + postfix" "$" "exec4_pdb_postfix") -check_value ("TARGET_PDB_FILE_BASE_NAME shared PDB all properties + postfix" "$" "shared4_pdb_postfix") +check_value ("TARGET_PDB_FILE_BASE_NAME executable PDB all properties + postfix" "$" "exec4_pdb") +check_value ("TARGET_PDB_FILE_BASE_NAME shared PDB all properties + postfix" "$" "shared4_pdb") ]]) endif()