From 92402800053c4903f731c8c5236a96a304e518be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 9 Jul 2016 09:57:29 +0200 Subject: [PATCH] Only disable optimisations when using RCT2 segments (#4007) --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1ac1796d1..561d9e43a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,9 +226,11 @@ INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${LIBCURL_INCLUDE_DIRS} ${JANSSON_INCLU LINK_DIRECTORIES(${SDL2_LIBRARY_DIRS} ${JANSSON_LIBRARY_DIRS} ${LIBCURL_LIBRARY_DIRS} ${PNG_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${BREAKPAD_LIBRARY_DIR} ${SSL_LIBRARY_DIRS}) -# Disable optimizations for addresses.c for all compilers, to allow optimized -# builds without need for -fno-omit-frame-pointer -set_source_files_properties(src/addresses.c PROPERTIES COMPILE_FLAGS -O0) +if (NOT DISABLE_RCT2) + # Disable optimizations for addresses.c for all compilers, to allow optimized + # builds without need for -fno-omit-frame-pointer + set_source_files_properties(src/addresses.c PROPERTIES COMPILE_FLAGS -O0) +endif (NOT DISABLE_RCT2) if (WIN32) # build as library for now, replace with add_executable