summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Vandaƫle <joshua@vandaele.software>2025-12-10 23:40:33 +0100
committerJoshua Vandaƫle <joshua@vandaele.software>2026-07-24 03:45:13 +0200
commit20bded80666227d7b76dbf34be046b7739f2f16c (patch)
tree705d8092fa661d560fa0464eb38aad7ced7255d2
parentd2833fb78882715950ab0a2c26c3ca20e3f6e349 (diff)
CMake: PDBs outside of Binaries
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d5ebfa61a..ec73707d0a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -195,6 +195,10 @@ if (WIN32)
endif()
endif()
+# Output directory for PDB files. PDBs are only generated on Windows with MSVC.
+# We set a common directory for all PDBs to avoid littering the Binaries/ directory.
+set(CMAKE_PDB_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}/pdb>)
+
if(ENABLE_CCACHE)
include(CCache)
if(NOT CCACHE_BIN)