aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-07-28 01:18:05 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-07-28 01:18:05 +0200
commite6d54407ba8ce580fbd81cb9389eb9ce4483597b (patch)
treef4ef3ef657245cf6d96a3d777ae63c6fda5b11d0
parent8eb54c5deca228fa5a34d22cb9f91d956eed773c (diff)
parent3abf4c72b4323e8cff35b77b9a5c2154c85aa185 (diff)
downloadrneovim-e6d54407ba8ce580fbd81cb9389eb9ce4483597b.tar.gz
rneovim-e6d54407ba8ce580fbd81cb9389eb9ce4483597b.tar.bz2
rneovim-e6d54407ba8ce580fbd81cb9389eb9ce4483597b.zip
Merge #7083 'build: disable array bounds checking in gcc < 4.8.5'
References #6931
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 141fa81e16..099f6e3787 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -240,6 +240,14 @@ 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")
+ # Array-bounds testing is broken in some GCC versions before 4.8.5.
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
+ add_definitions(-Wno-array-bounds)
+ endif()
+endif()
+
option(TRAVIS_CI_BUILD "Travis/QuickBuild CI. Extra flags will be set." OFF)
if(TRAVIS_CI_BUILD)