Browse Source

Merge topic 'object-library-compile-pdb'

feff52d4 Fix COMPILE_PDB_NAME when used on an OBJECT library
pull/291/merge
Brad King 9 years ago
committed by CMake Topic Stage
parent
commit
e348d8db55
  1. 2
      Source/cmGeneratorTarget.cxx
  2. 1
      Tests/ObjectLibrary/A/CMakeLists.txt

2
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()) {

1
Tests/ObjectLibrary/A/CMakeLists.txt

@ -21,3 +21,4 @@ add_custom_command(
add_library(A OBJECT a1.c a2.c a.cmake)
target_include_directories(A PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
set_property(TARGET A PROPERTY COMPILE_PDB_NAME Apdb)
Loading…
Cancel
Save