diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index c143666c8..7ef35f811 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -49,7 +49,7 @@ endmacro () add_warning(all) add_warning(extra) add_warning(error) # treat all warnings as errors -if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") +#if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_warning(strict-overflow=2) add_warning(suggest-override) add_warning(suggest-destructor-override) @@ -66,30 +66,30 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") no_warning(shorten-64-to-32) no_warning(padded) no_warning(missing-noreturn) -elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - add_warning(pedantic) - # Add compiler options only to c++ compiler - function(add_cxx_compile_options option) - add_compile_options("$<$,CXX>:${option}>") - endfunction() - add_cxx_compile_options(-Wstrict-overflow=1) - add_cxx_compile_options(-Wdelete-incomplete) - add_cxx_compile_options(-Wduplicated-cond) - add_cxx_compile_options(-Wdisabled-optimization) - add_cxx_compile_options(-Winit-self) - add_cxx_compile_options(-Wbool-compare) - add_cxx_compile_options(-Wlogical-not-parentheses) - add_cxx_compile_options(-Wlogical-op) - add_cxx_compile_options(-Wmaybe-uninitialized) - add_cxx_compile_options(-Wmisleading-indentation) - add_cxx_compile_options(-Wno-return-local-addr) - add_cxx_compile_options(-Wodr) - add_cxx_compile_options(-Wpointer-arith) - add_cxx_compile_options(-Wredundant-decls) - add_cxx_compile_options(-Wreorder) - add_cxx_compile_options(-Wshift-negative-value) - add_cxx_compile_options(-Wsizeof-array-argument) - add_cxx_compile_options(-Wswitch-bool) - add_cxx_compile_options(-Wtautological-compare) - add_cxx_compile_options(-Wtrampolines) -endif() +#elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + # add_warning(pedantic) + # # Add compiler options only to c++ compiler + # function(add_cxx_compile_options option) + # add_compile_options("$<$,CXX>:${option}>") + # endfunction() + # add_cxx_compile_options(-Wstrict-overflow=1) + # add_cxx_compile_options(-Wdelete-incomplete) + # add_cxx_compile_options(-Wduplicated-cond) + # add_cxx_compile_options(-Wdisabled-optimization) + # add_cxx_compile_options(-Winit-self) + # add_cxx_compile_options(-Wbool-compare) + # add_cxx_compile_options(-Wlogical-not-parentheses) + # add_cxx_compile_options(-Wlogical-op) + # add_cxx_compile_options(-Wmaybe-uninitialized) + # add_cxx_compile_options(-Wmisleading-indentation) + # add_cxx_compile_options(-Wno-return-local-addr) + # add_cxx_compile_options(-Wodr) + # add_cxx_compile_options(-Wpointer-arith) + # add_cxx_compile_options(-Wredundant-decls) + # add_cxx_compile_options(-Wreorder) + # add_cxx_compile_options(-Wshift-negative-value) + # add_cxx_compile_options(-Wsizeof-array-argument) + # add_cxx_compile_options(-Wswitch-bool) + # add_cxx_compile_options(-Wtautological-compare) + # add_cxx_compile_options(-Wtrampolines) +#endif()