Skip to content

Commit 216f1a4

Browse files
committed
Set a debug postfix when building with MSVC.
Otherwise, the debug and release versions collide/overwrite.
1 parent a9a114f commit 216f1a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ if ( MSVC )
9595
# Only enabled in debug because some old versions of VS STL generate
9696
# unreachable code warning when compiled in release configuration.
9797
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W4 ")
98+
99+
# MSVC has incompatible runtimes between debug and release modes.
100+
set(CMAKE_DEBUG_POSTFIX "d")
98101
endif()
99102

100103
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")

0 commit comments

Comments
 (0)