set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
endif()
+# GCC specific options.
if (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
# TODO: Add --gc-sections support. We need some checks for NetBSD to ensure this works.
endif()
+ option(EVENT__ENABLE_GCC_WARNINGS "Make all GCC warnings into errors" OFF)
+ if (EVENT__ENABLE_GCC_WARNINGS)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+ endif()
+
# We need to test for at least gcc 2.95 here, because older versions don't
# have -fno-strict-aliasing
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion