Do not set C++ compilation options when compiling C files.

This commit is contained in:
Ghislain MARY 2017-09-21 16:26:14 +02:00
parent 3c28b14440
commit 6f14954482

View file

@ -290,14 +290,16 @@ else()
"-Wfloat-equal"
"-Winit-self"
"-Wno-error=deprecated-declarations"
"-Woverloaded-virtual"
"-Wpointer-arith"
"-Wuninitialized"
"-Wunused"
)
list(APPEND STRICT_OPTIONS_CXX
"-Woverloaded-virtual"
)
CHECK_CXX_COMPILER_FLAG("-Wsuggest-override" SUGGEST_OVERRIDE)
if (SUGGEST_OVERRIDE)
list(APPEND STRICT_OPTIONS_CPP "-Wsuggest-override" "-Werror=suggest-override")
list(APPEND STRICT_OPTIONS_CXX "-Wsuggest-override" "-Werror=suggest-override")
endif ()
list(APPEND STRICT_OPTIONS_C "-Wstrict-prototypes" "-Werror=strict-prototypes")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")