summaryrefslogtreecommitdiffstats
path: root/googletest/cmake/internal_utils.cmake
diff options
context:
space:
mode:
authorAndrei Polushin <polushin@gmail.com>2022-07-11 10:16:58 (GMT)
committerAndrei Polushin <polushin@gmail.com>2022-07-12 19:13:34 (GMT)
commita2d6ee847e8f7181c6373901f55ae0abd69ec0ae (patch)
treec12bb54b988026f04912595fda2cb63054c02dd4 /googletest/cmake/internal_utils.cmake
parentbea621c3c39d8a7f71f07bd543c3a58bfa684f92 (diff)
downloadgoogletest-a2d6ee847e8f7181c6373901f55ae0abd69ec0ae.zip
googletest-a2d6ee847e8f7181c6373901f55ae0abd69ec0ae.tar.gz
googletest-a2d6ee847e8f7181c6373901f55ae0abd69ec0ae.tar.bz2
cmake: make PDB output directory match that of a static library.refs/pull/3940/head
PDB files should be created at the same location as their primary artifact, which is either static library or a DLL. On Windows, an artifact location is controlled by: * RUNTIME_OUTPUT_DIRECTORY is a directory of a DLL artifact. * ARCHIVE_OUTPUT_DIRECTORY is a directory of a LIB artifact. A PDB file location is controlled: * PDB_OUTPUT_DIRECTORY should match a directory of a DLL artifact. * COMPILE_PDB_OUTPUT_DIRECTORY should match a directory of a LIB artifact.
Diffstat (limited to 'googletest/cmake/internal_utils.cmake')
-rw-r--r--googletest/cmake/internal_utils.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index 107147f..b259ced 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -162,7 +162,8 @@ function(cxx_library_with_type name type cxx_flags)
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
- PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+ PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
# make PDBs match library name
get_target_property(pdb_debug_postfix ${name} DEBUG_POSTFIX)
set_target_properties(${name}