diff options
author | Brad King <brad.king@kitware.com> | 2017-02-27 14:11:22 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-02-27 14:11:22 (GMT) |
commit | e348d8db559fd1d79f936d42582eb628779d23ad (patch) | |
tree | 3397359292c52b77cebfeb3d68efe3fa5cceb546 | |
parent | 9b02283a1fdb63b0cf9755ae37a0d22fc6f4dbf4 (diff) | |
parent | feff52d42ca18a52fd99e8fdfd3093c3a94eb498 (diff) | |
download | CMake-e348d8db559fd1d79f936d42582eb628779d23ad.zip CMake-e348d8db559fd1d79f936d42582eb628779d23ad.tar.gz CMake-e348d8db559fd1d79f936d42582eb628779d23ad.tar.bz2 |
Merge topic 'object-library-compile-pdb'
feff52d4 Fix COMPILE_PDB_NAME when used on an OBJECT library
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 2 | ||||
-rw-r--r-- | Tests/ObjectLibrary/A/CMakeLists.txt | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8512b99..5815210 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()) { diff --git a/Tests/ObjectLibrary/A/CMakeLists.txt b/Tests/ObjectLibrary/A/CMakeLists.txt index 188fd64..c185d75 100644 --- a/Tests/ObjectLibrary/A/CMakeLists.txt +++ b/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) |