summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 1 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 542957455..a0fe76c24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,28 +127,7 @@ cmake_dependent_option(ENABLE_THREADED_RESOLVER "Set to ON to enable threaded DN
option(ENABLE_DEBUG "Set to ON to enable curl debug features" OFF)
option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" OFF)
-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
- if(PICKY_COMPILER)
- foreach(_CCOPT -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wenum-conversion -Warith-conversion)
- # surprisingly, CHECK_C_COMPILER_FLAG needs a new variable to store each new
- # test result in.
- string(MAKE_C_IDENTIFIER "OPT${_CCOPT}" _optvarname)
- check_c_compiler_flag(${_CCOPT} ${_optvarname})
- if(${_optvarname})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT}")
- endif()
- endforeach()
- foreach(_CCOPT long-long multichar format-nonliteral sign-conversion system-headers pedantic-ms-format)
- # GCC only warns about unknown -Wno- options if there are also other diagnostic messages,
- # so test for the positive form instead
- string(MAKE_C_IDENTIFIER "OPT${_CCOPT}" _optvarname)
- check_c_compiler_flag("-W${_CCOPT}" ${_optvarname})
- if(${_optvarname})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-${_CCOPT}")
- endif()
- endforeach()
- endif()
-endif()
+include(PickyWarnings)
if(ENABLE_DEBUG)
# DEBUGBUILD will be defined only for Debug builds