From 6d650728f6594d751de6291b40b567f50204bc90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Thu, 2 Nov 2023 21:58:36 +0100 Subject: [PATCH] Update CMake and XCode build systems --- src/CMakeLists.txt | 4 ++++ src/Makefile.d/detect.mk | 3 ++- src/Makefile.d/versions.mk | 2 +- src/sdl/macosx/Srb2mac.pbproj/project.pbxproj | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22c1def27..5fbc7002a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -260,6 +260,10 @@ target_compile_options(SRB2SDL2 PRIVATE -Wdisabled-optimization > + $<$,3.4.0>: + -fwrapv + > + $<$,4.0.0>: -Wold-style-definition -Wmissing-field-initializers diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index 9e2736946..3d9fc2766 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -65,7 +65,8 @@ gcc_versions:=\ 75 74 73 72 71 70\ 64 63 62 61 60\ 55 54 53 52 51 50\ - 49 48 47 46 45 44 43 42 41 40 + 49 48 47 46 45 44 43 42 41 40\ + 34 latest_gcc_version:=13.2 diff --git a/src/Makefile.d/versions.mk b/src/Makefile.d/versions.mk index 73d352138..40ccd9f26 100644 --- a/src/Makefile.d/versions.mk +++ b/src/Makefile.d/versions.mk @@ -160,7 +160,7 @@ opts+=-O0 endif endif -ifdef GCC45 +ifdef GCC34 opts+=-fwrapv endif diff --git a/src/sdl/macosx/Srb2mac.pbproj/project.pbxproj b/src/sdl/macosx/Srb2mac.pbproj/project.pbxproj index 909bb2ced..40f580be1 100644 --- a/src/sdl/macosx/Srb2mac.pbproj/project.pbxproj +++ b/src/sdl/macosx/Srb2mac.pbproj/project.pbxproj @@ -2133,7 +2133,7 @@ INSTALL_PATH = "$(HOME)/Applications"; JAVA_COMPILER_DEBUGGING_SYMBOLS = NO; OPTIMIZATION_CFLAGS = "-O2"; - OTHER_CFLAGS = "-DMAC_ALERT -DUNIXCOMMON -DSDLMAIN -DHAVE_MIXER -DHAVE_PNG -D_BIG_ENDIAN -DSTDC_HEADERS -DSDL -Wall -Winline -fno-strict-aliasing"; + OTHER_CFLAGS = "-DMAC_ALERT -DUNIXCOMMON -DSDLMAIN -DHAVE_MIXER -DHAVE_PNG -D_BIG_ENDIAN -DSTDC_HEADERS -DSDL -Wall -Winline -fno-strict-aliasing -fwrapv"; OTHER_REZFLAGS = ""; PREBINDING = NO; PRODUCT_NAME = Srb2;