diff options
author | Milan Crha <mcrha@redhat.com> | 2018-11-14 12:58:37 +0100 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2018-11-14 12:58:37 +0100 |
commit | dc9ec0222772457223e87af8f9f99b9c8fef05af (patch) | |
tree | 3cded4ff80f64a3efe7dc0fa7216bbaa28ba1887 /cmake | |
parent | b4af3c2db37730dcca5e5835ae4b4cfa4c76d266 (diff) | |
download | evolution-dc9ec0222772457223e87af8f9f99b9c8fef05af.tar.gz |
Correct how extra compiler warnings are used in the maintainer mode
...and address the newly shown warnings as well.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/SetupBuildFlags.cmake | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmake/modules/SetupBuildFlags.cmake b/cmake/modules/SetupBuildFlags.cmake index 10b12bd0cc..4c6154129b 100644 --- a/cmake/modules/SetupBuildFlags.cmake +++ b/cmake/modules/SetupBuildFlags.cmake @@ -20,22 +20,23 @@ macro(setup_build_flags _maintainer_mode) -Wredundant-decls -Wundef -Wwrite-strings + -Wno-cast-function-type -no-undefined -fno-strict-aliasing ) - if(_maintainer_mode) + if(${_maintainer_mode}) list(APPEND proposed_flags -Wall -Wextra -Wdeprecated-declarations -Wmissing-include-dirs ) - else(_maintainer_mode) + else(${_maintainer_mode}) list(APPEND proposed_flags -Wno-deprecated-declarations -Wno-missing-include-dir) - endif(_maintainer_mode) + endif(${_maintainer_mode}) list(APPEND proposed_c_flags ${proposed_flags} @@ -62,7 +63,7 @@ macro(setup_build_flags _maintainer_mode) foreach(flag IN LISTS proposed_c_flags) check_c_compiler_flag(${flag} c_flag_${flag}_supported) if(c_flag_${flag}_supported) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}") + set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}") endif(c_flag_${flag}_supported) unset(c_flag_${flag}_supported) endforeach() @@ -71,7 +72,7 @@ macro(setup_build_flags _maintainer_mode) foreach(flag IN LISTS proposed_cxx_flags) check_cxx_compiler_flag(${flag} cxx_flag_${flag}_supported) if(cxx_flag_${flag}_supported) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}") + set(CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}") endif(cxx_flag_${flag}_supported) unset(cxx_flag_${flag}_supported) endforeach() |