Build with -Os under Linux/Mac

This reduces the size of the generated executable by 20%
This commit is contained in:
Robert Knight 2011-10-04 23:06:59 +01:00
parent 78c14868c6
commit f49c147c4f

View file

@ -22,6 +22,11 @@ include_directories(external/win32cpp/include)
# so that the executable can function standalone
set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
else()
# optimize for reduced code size
set(CMAKE_CXX_FLAGS_RELEASE "-Os")
set(CMAKE_C_FLAGS_RELEASE "-Os")
endif()
if (APPLE)