summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-06-22 20:20:28 -0400
committerAdam <Adam@anope.org>2016-06-22 20:20:28 -0400
commit7cf42453592b845aa946af7313395deb998abee0 (patch)
treeea9043389000d54901b57ec0e42bf2d5a4d06d69 /CMakeLists.txt
parent56b158ea430ace114db1a44558923b2641b44fea (diff)
Enable -fno-delete-null-pointer-checks on GCC 6
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 595a12456..b514e7f2f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(GCC_VERSION LESS 4.2)
message(FATAL_ERROR "Your compiler is too old to build Anope. Upgrade to GCC 4.2 or newer!")
endif(GCC_VERSION LESS 4.2)
+ if(GCC_VERSION GREATER 6.0 OR GCC_VERSION EQUAL 6.0)
+ set(CXXFLAGS "${CXXFLAGS} -fno-delete-null-pointer-checks")
+ endif(GCC_VERSION GREATER 6.0 OR GCC_VERSION EQUAL 6.0)
endif(CMAKE_COMPILER_IS_GNUCXX)
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes