summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 057481bd..82a1ad32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,11 @@ if(CMAKE_VERSION VERSION_LESS "3.1")
else()
set (CMAKE_C_STANDARD 99)
endif()
+include(CheckCCompilerFlag)
+CHECK_C_COMPILER_FLAG("-Werror=pointer-arith" COMPILER_HAS_POINTER_ARITH_TOGGLE)
+if(COMPILER_HAS_POINTER_ARITH_TOGGLE)
+ set(CMAKE_C_FLAGS "-Werror=pointer-arith ${CMAKE_C_FLAGS}")
+endif()
add_subdirectory(src release)