Skip to content

Commit

Permalink
Reduce optimisation level.
Browse files Browse the repository at this point in the history
Optimisations of -O3 are causing issues, probably due to undefined behaviour.
  • Loading branch information
OmniBlade authored and giulianobelinassi committed Jun 18, 2024
1 parent e90f32e commit 4d324e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(FeatureSummary)
include(CheckCXXCompilerFlag)

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

project(VanillaConquer C CXX)
Expand Down
8 changes: 4 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
"cacheVariables": {
"CMAKE_CXX_FLAGS_DEBUG": "-g3 -Og",
"CMAKE_C_FLAGS_DEBUG": "-g3 -Og",
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -g3 -DNDEBUG",
"CMAKE_C_FLAGS_RELEASE": "-O3 -g3 -DNDEBUG",
"CMAKE_CXX_FLAGS_RELEASE": "-O2 -g3 -DNDEBUG",
"CMAKE_C_FLAGS_RELEASE": "-O2 -g3 -DNDEBUG",
"VC_CXX_FLAGS": "-w;-Wwrite-strings;-Werror=write-strings",
"MAP_EDITORTD": "ON",
"MAP_EDITORRA": "ON",
Expand Down Expand Up @@ -174,8 +174,8 @@
"cacheVariables": {
"CMAKE_CXX_FLAGS_DEBUG": "-g -Og",
"CMAKE_C_FLAGS_DEBUG": "-g -Og",
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -g -DNDEBUG",
"CMAKE_C_FLAGS_RELEASE": "-O3 -g -DNDEBUG",
"CMAKE_CXX_FLAGS_RELEASE": "-O2 -g -DNDEBUG",
"CMAKE_C_FLAGS_RELEASE": "-O2 -g -DNDEBUG",
"CMAKE_EXE_LINKER_FLAGS": "-static-libstdc++ -static-libgcc",
"CMAKE_SHARESD_LINKER_FLAGS": "-static-libstdc++ -static-libgcc",
"VC_CXX_FLAGS": "-w;-Wwrite-strings;-Werror=write-strings",
Expand Down

0 comments on commit 4d324e1

Please sign in to comment.