CMakeLists.txt
changeset 13911 d4874de4736b
parent 13886 99b265e0d1d0
child 13914 a44e4c057f57
--- a/CMakeLists.txt	Sun Oct 14 19:28:24 2018 +0300
+++ b/CMakeLists.txt	Sun Oct 14 20:02:51 2018 +0300
@@ -115,10 +115,18 @@
 #set default compiler flags
 add_flag_append(CMAKE_C_FLAGS "-Wall -pipe")
 add_flag_append(CMAKE_C_FLAGS_RELEASE "-O2")
-add_flag_append(CMAKE_C_FLAGS_DEBUG "-Wextra -O0")
+if(WIN32 AND VCPKG_TOOLCHAIN)
+    add_flag_append(CMAKE_C_FLAGS_DEBUG "-O0")
+else()
+    add_flag_append(CMAKE_C_FLAGS_DEBUG "-Wextra -O0")
+endif()
 add_flag_append(CMAKE_CXX_FLAGS "-Wall -pipe")
 add_flag_append(CMAKE_CXX_FLAGS_RELEASE "-O2")
-add_flag_append(CMAKE_CXX_FLAGS_DEBUG "-Wextra -O0")
+if(WIN32 AND VCPKG_TOOLCHAIN)
+    add_flag_append(CMAKE_CXX_FLAGS_DEBUG "-O0")
+else()
+    add_flag_append(CMAKE_CXX_FLAGS_DEBUG "-Wextra -O0")
+endif()
 
 #CMake adds a lot of additional configuration flags, so let's clear them up
 if(MINIMAL_FLAGS)