Newer
Older
Gigg, Martyn Anthony
committed
###############################################################################
Gigg, Martyn Anthony
committed
# Specialized setup for GNU gcc compilers.
Gigg, Martyn Anthony
committed
###############################################################################
Gigg, Martyn Anthony
committed
# The settings and definitions here will apply to all projects. Specific
# project settings should be included in the relevant CMakeLists.txt file
# for that project.
# Global warning flags.
set( GNUFLAGS "-Wall -Wextra -Wconversion -Winit-self -Wpointer-arith -Wcast-qual -Wcast-align -Woverloaded-virtual -fno-common" )
Gigg, Martyn Anthony
committed
# Disable some warnings about deprecated headers and type conversions that
# we can't do anything about
# -Wno-deprecated: Do not warn about use of deprecated headers.
# -Wno-write-strings: Do not warn about deprecated conversions of char*->const char*
# -Wno-unused-result: Do not warn about unused return values in some C functions
set( GNUFLAGS "${GNUFLAGS} -Wno-deprecated -Wno-write-strings -Wno-unused-result")
Gigg, Martyn Anthony
committed
# Set the options fo gcc and g++
Russell Taylor
committed
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GNUFLAGS}" )
Gigg, Martyn Anthony
committed
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GNUFLAGS} -fno-operator-names" )
Gigg, Martyn Anthony
committed
# Cleanup
set ( GNUFLAGS )