From c89ca716c5c9d9782db78f89c271bd831f5f96bc Mon Sep 17 00:00:00 2001 From: Niels Date: Thu, 16 Jul 2015 19:32:19 +0200 Subject: [PATCH] switch off optimizations in MSVC --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 350c54ec..18cc6f23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,11 @@ add_executable(json_unit if(MSVC) set(CMAKE_CXX_FLAGS - "/EHsc /Od" + "/EHsc" ) + + STRING(REPLACE "-O2" "-Od" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) + add_definitions(-D_SCL_SECURE_NO_WARNINGS) else(MSVC) set(CMAKE_CXX_FLAGS