Skip to content

Commit 4d324e1

Browse files
OmniBladegiulianobelinassi
authored andcommitted
Reduce optimisation level.
Optimisations of -O3 are causing issues, probably due to undefined behaviour.
1 parent e90f32e commit 4d324e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include(FeatureSummary)
55
include(CheckCXXCompilerFlag)
66

77
if(NOT DEFINED CMAKE_BUILD_TYPE)
8-
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE)
8+
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE)
99
endif()
1010

1111
project(VanillaConquer C CXX)

CMakePresets.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
"cacheVariables": {
109109
"CMAKE_CXX_FLAGS_DEBUG": "-g3 -Og",
110110
"CMAKE_C_FLAGS_DEBUG": "-g3 -Og",
111-
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -g3 -DNDEBUG",
112-
"CMAKE_C_FLAGS_RELEASE": "-O3 -g3 -DNDEBUG",
111+
"CMAKE_CXX_FLAGS_RELEASE": "-O2 -g3 -DNDEBUG",
112+
"CMAKE_C_FLAGS_RELEASE": "-O2 -g3 -DNDEBUG",
113113
"VC_CXX_FLAGS": "-w;-Wwrite-strings;-Werror=write-strings",
114114
"MAP_EDITORTD": "ON",
115115
"MAP_EDITORRA": "ON",
@@ -174,8 +174,8 @@
174174
"cacheVariables": {
175175
"CMAKE_CXX_FLAGS_DEBUG": "-g -Og",
176176
"CMAKE_C_FLAGS_DEBUG": "-g -Og",
177-
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -g -DNDEBUG",
178-
"CMAKE_C_FLAGS_RELEASE": "-O3 -g -DNDEBUG",
177+
"CMAKE_CXX_FLAGS_RELEASE": "-O2 -g -DNDEBUG",
178+
"CMAKE_C_FLAGS_RELEASE": "-O2 -g -DNDEBUG",
179179
"CMAKE_EXE_LINKER_FLAGS": "-static-libstdc++ -static-libgcc",
180180
"CMAKE_SHARESD_LINKER_FLAGS": "-static-libstdc++ -static-libgcc",
181181
"VC_CXX_FLAGS": "-w;-Wwrite-strings;-Werror=write-strings",

0 commit comments

Comments
 (0)