From 04db9b4bc736b25a612b1b945af701fc374b585d Mon Sep 17 00:00:00 2001 From: clobber Date: Fri, 27 Apr 2018 15:54:58 -0500 Subject: [PATCH] Disallow debug compiling. --- mGBA.xcodeproj/project.pbxproj | 1 + src/platform/openemu/mGBAGameCore.m | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/mGBA.xcodeproj/project.pbxproj b/mGBA.xcodeproj/project.pbxproj index 808a16f..ffcc607 100644 --- a/mGBA.xcodeproj/project.pbxproj +++ b/mGBA.xcodeproj/project.pbxproj @@ -3221,6 +3221,7 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO; GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/src/platform/openemu/mGBAGameCore.m b/src/platform/openemu/mGBAGameCore.m index c236962..e799109 100644 --- a/src/platform/openemu/mGBAGameCore.m +++ b/src/platform/openemu/mGBAGameCore.m @@ -43,6 +43,10 @@ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF #define SAMPLES 1024 +#ifdef DEBUG + #error "Cores should not be compiled in DEBUG! Follow the guide https://github.com/OpenEmu/OpenEmu/wiki/Compiling-From-Source-Guide" +#endif + const char* const binaryName = "mGBA"; @interface mGBAGameCore ()