CMakeLists.txt
changeset 13914 a44e4c057f57
parent 13911 d4874de4736b
child 14152 89acfded7722
--- a/CMakeLists.txt	Sun Oct 14 19:04:51 2018 +0200
+++ b/CMakeLists.txt	Sun Oct 14 21:25:59 2018 +0300
@@ -113,20 +113,21 @@
 endif()
 
 #set default compiler flags
-add_flag_append(CMAKE_C_FLAGS "-Wall -pipe")
-add_flag_append(CMAKE_C_FLAGS_RELEASE "-O2")
 if(WIN32 AND VCPKG_TOOLCHAIN)
-    add_flag_append(CMAKE_C_FLAGS_DEBUG "-O0")
+    add_flag_append(CMAKE_C_FLAGS "/DWIN32_VCPKG /Wall")
+    add_flag_append(CMAKE_C_FLAGS_RELEASE "/Ox")
+    add_flag_append(CMAKE_C_FLAGS_DEBUG "/Od")
+    add_flag_append(CMAKE_CXX_FLAGS "/DWIN32_VCPKG /Wall")
+    add_flag_append(CMAKE_CXX_FLAGS_RELEASE "/Ox")
+    add_flag_append(CMAKE_CXX_FLAGS_DEBUG "/Od")    
 else()
+    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")
-endif()
-add_flag_append(CMAKE_CXX_FLAGS "-Wall -pipe")
-add_flag_append(CMAKE_CXX_FLAGS_RELEASE "-O2")
-if(WIN32 AND VCPKG_TOOLCHAIN)
-    add_flag_append(CMAKE_CXX_FLAGS_DEBUG "-O0")
-else()
-    add_flag_append(CMAKE_CXX_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")    
+endif()       
 
 #CMake adds a lot of additional configuration flags, so let's clear them up
 if(MINIMAL_FLAGS)