From db32b86d7042d7ece27fd036459d98b9cb85b1fc Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Sep 2012 20:30:28 +0200 Subject: [PATCH] Fixed: #1493 Remove also -O flags from environment variables --- code/CMakeModules/nel.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 5768987e3..fcf25b258 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -422,8 +422,9 @@ MACRO(NL_SETUP_BUILD) SET(PLATFORM_CFLAGS "$ENV{CFLAGS} ${PLATFORM_CFLAGS}") SET(PLATFORM_LINKFLAGS "$ENV{LDFLAGS} ${PLATFORM_LINKFLAGS}") - # Remove -g flag because we are managing it ourself + # Remove -g and -O flag because we are managing them ourself STRING(REPLACE "-g" "" PLATFORM_CFLAGS ${PLATFORM_CFLAGS}) + STRING(REGEX REPLACE "-O[0-9s]" "" PLATFORM_CFLAGS ${PLATFORM_CFLAGS}) # Strip spaces STRING(STRIP ${PLATFORM_CFLAGS} PLATFORM_CFLAGS)