diff options
author | John Szakmeister <john@szakmeister.net> | 2017-07-27 06:48:00 -0400 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2017-07-27 07:35:15 -0400 |
commit | 3abf4c72b4323e8cff35b77b9a5c2154c85aa185 (patch) | |
tree | a19e3a4427e3cf8913ec7547bf76ac4f03d38ef8 | |
parent | 8eb54c5deca228fa5a34d22cb9f91d956eed773c (diff) | |
download | rneovim-3abf4c72b4323e8cff35b77b9a5c2154c85aa185.tar.gz rneovim-3abf4c72b4323e8cff35b77b9a5c2154c85aa185.tar.bz2 rneovim-3abf4c72b4323e8cff35b77b9a5c2154c85aa185.zip |
build: disable array bounds checking in gcc < 4.8.5
Thanks to James McCoy (jamessan) for finding the source of this issue.
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 141fa81e16..d1d6cd237f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,6 +240,16 @@ if(HAS_DIAG_COLOR_FLAG) add_definitions(-fdiagnostics-color=auto) endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.5") + # The array-bounds testing is broken in some versions of GCC, so we disable + # it in everything prior to 4.8.5. + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273 for details about + # the bug. + add_definitions(-Wno-array-bounds) + endif() +endif() + option(TRAVIS_CI_BUILD "Travis/QuickBuild CI. Extra flags will be set." OFF) if(TRAVIS_CI_BUILD) |