if(enable_compile_warnings)
set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing")
- if(CMAKE_COMPILER_IS_GNUCC AND (NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS "5.0")))
- set(warnCFLAGS "${warnCFLAGS} -Wformat-signedness")
- endif()
if(CMAKE_COMPILER_IS_GNUCC)
- set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
+ set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wformat-signedness -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
# ignore remarks:
endif()
set(warnCXXFLAGS "${warnCFLAGS} -Wall -Wextra -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing")
- if(CMAKE_COMPILER_IS_GNUCXX AND (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")))
- set(warnCFLAGS "${warnCFLAGS} -Wformat-signedness")
- endif()
if(CMAKE_COMPILER_IS_GNUCXX)
- set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
+ set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wformat-signedness -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
endif()
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0")
# workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81767