diff options
author | John Szakmeister <john@szakmeister.net> | 2014-11-08 09:29:05 -0500 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2014-11-08 09:29:05 -0500 |
commit | 2aeda4ba6f033707dd96daabd2084d239ac82b3d (patch) | |
tree | 111778880d3f2369aee23d0b5b4389a74be3f7ac | |
parent | 7d0a689476fdffc1e027ff0205fa404ba9d81602 (diff) | |
parent | 5d97f3fc2c259613db7065f249e073a7994fab29 (diff) | |
download | rneovim-2aeda4ba6f033707dd96daabd2084d239ac82b3d.tar.gz rneovim-2aeda4ba6f033707dd96daabd2084d239ac82b3d.tar.bz2 rneovim-2aeda4ba6f033707dd96daabd2084d239ac82b3d.zip |
Merge pull request #1426 from jszakmeister/change-release-opt-default
build: default to using -O2 for release builds
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index eb79a18747..951a0c14f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,9 @@ if(APPLE) endif() endif() +# Default to -O2 on release builds. +string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + # gcc 4.0 and better turn on _FORTIFY_SOURCE=2 automatically. This currently # does not work with Neovim due to some uses of dynamically-sized structures. # See https://github.com/neovim/neovim/issues/223 for details. |