From 01c7a3bd9e555a68a3f88adb8e1ed678a148c279 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Sun, 31 Jan 2016 17:54:53 -0800 Subject: [PATCH] Make it possible to use the debug CRT --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82e96449..d61c408e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,10 +162,14 @@ else() set(${var}_RELEASE "${${var}_RELEASE} /Zi") string(REPLACE "/Ob1" "/Ob2" ${var}_RELWITHDEBINFO "${${var}_RELWITHDEBINFO}") + if (true) # /MDd means link with the debug crt library, which we don't want; and /D_DEBUG forces # that as well because of some includes; turn them off. string(REPLACE "/MDd" "/MD" ${var}_DEBUG "${${var}_DEBUG}") string(REPLACE "/D_DEBUG" "/DENABLE_DEBUG=1 /DDEBUG=1 /DMOO_DEBUG=1" ${var}_DEBUG "${${var}_DEBUG}") + else() + string(REPLACE "/D_DEBUG" "/DENABLE_DEBUG=1 /DDEBUG=1 /DMOO_DEBUG=1 /D_DEBUG" ${var}_DEBUG "${${var}_DEBUG}") + endif() endforeach() endif()