From 9f75a9ce78987a1e3cb9a116560b3de9afb3695c Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Fri, 30 Mar 2012 06:34:30 -0700 Subject: [PATCH] Turning on runtime checks when building debug under MSVC. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 383627bb9..c624e4986 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,10 +64,11 @@ IF (MSVC) IF (STDCALL) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gz") ENDIF () - # TODO: bring back /RTC1 /RTCc - SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd") + SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd /RTC1 /RTCs /RTCu") SET(CMAKE_C_FLAGS_RELEASE "/MT /O2") SET(WIN_RC "src/win32/git2.rc") + + # Precompiled headers ELSE () SET(CMAKE_C_FLAGS "-O2 -g -D_GNU_SOURCE -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes -Wmissing-prototypes ${CMAKE_C_FLAGS}") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")