Skip to content
Snippets Groups Projects
Commit bad6c550 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Avoid -Wpedantic with clang.

parent 140d2c16
No related branches found
No related tags found
No related merge requests found
......@@ -37,18 +37,16 @@ set( GNUFLAGS "-Wall -Wextra -Wconversion -Winit-self -Wpointer-arith -Wcast-qua
# -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 -Wpedantic")
if ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
set(GNUFLAGS "${GNUFLAGS} -Wno-sign-conversion")
endif()
set( GNUFLAGS "${GNUFLAGS} -Wno-deprecated -Wno-write-strings -Wno-unused-result")
# Check if we have a new enough version for these flags
if ( CMAKE_COMPILER_IS_GNUCXX )
set (GNUFLAGS "${GNUFLAGS} -Wpedantic")
if (NOT (GCC_COMPILER_VERSION VERSION_LESS "5.1"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-final-types -Wsuggest-final-methods")
set(GNUFLAGS "${GNUFLAGS} -Wsuggest-override")
endif()
else if ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
set(GNUFLAGS "${GNUFLAGS} -Wno-sign-conversion")
endif()
# Add some options for debug build to help the Zoom profiler
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment