From 3f1ce57fa198bef1bb6e10483c088c29ee29c5b2 Mon Sep 17 00:00:00 2001 From: Exynox Date: Sun, 3 Mar 2024 19:09:27 +0200 Subject: [PATCH] Enforced signed datatypes for char variables, fixing ARM builds --- src/db/CMakeLists.txt | 3 +++ src/game/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/db/CMakeLists.txt b/src/db/CMakeLists.txt index b2fc2e5..36a78d3 100644 --- a/src/db/CMakeLists.txt +++ b/src/db/CMakeLists.txt @@ -17,6 +17,9 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") target_compile_definitions(${PROJECT_NAME} PRIVATE SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE) endif() +# Treat char variables as signed, especially useful for ARM builds +target_compile_options(${PROJECT_NAME} PUBLIC -fsigned-char) + # Find dependencies # diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt index 8951355..a9f7d76 100644 --- a/src/game/CMakeLists.txt +++ b/src/game/CMakeLists.txt @@ -17,6 +17,9 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") target_compile_definitions(${PROJECT_NAME} PRIVATE SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE) endif() +# Treat char variables as signed, especially useful for ARM builds +target_compile_options(${PROJECT_NAME} PUBLIC -fsigned-char) + # Find dependencies #