Commit e6806d89 authored by Pino Toscano's avatar Pino Toscano

cmake: Enable compiler warnings for C code

Compilation of glib/demo uses a C compiler, thus compiler warnings
should be enabled in the CFLAGS variable.

followup of 5c5945d1
parent bdb17da3
......@@ -217,9 +217,11 @@ if(_comp_warnings STREQUAL "no")
set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_NO} ${CMAKE_CXX_FLAGS}")
endif(_comp_warnings STREQUAL "no")
if(_comp_warnings STREQUAL "yes")
set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_YES} ${CMAKE_CXX_FLAGS}")
endif(_comp_warnings STREQUAL "yes")
if(_comp_warnings STREQUAL "kde")
set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_KDE} ${CMAKE_CXX_FLAGS}")
endif(_comp_warnings STREQUAL "kde")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment