Make it possible to use the debug CRT

This commit is contained in:
Yevgen Muntyan 2016-01-31 17:54:53 -08:00
parent 869fe2e5e7
commit 01c7a3bd9e

View File

@ -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()