diff options
author | Christian Andersen <csandersen3@gmail.com> | 2024-02-04 19:26:00 +0100 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2024-03-03 15:32:50 -0600 |
commit | d06a11360d1a7632c4629ddf29093000b2397645 (patch) | |
tree | 618a06fb4b68e50512f02eb507c8c5179d777d5e | |
parent | 7eb79e69595a92398bf1d63c5c0799de6647130c (diff) | |
download | portable-d06a11360d1a7632c4629ddf29093000b2397645.tar.gz portable-d06a11360d1a7632c4629ddf29093000b2397645.tar.bz2 portable-d06a11360d1a7632c4629ddf29093000b2397645.zip |
Windows: Don't set -Wall when compiling with Visual Studio.
As it enables a lot of spammed warnings that are not part of W4. This
reduces the warnings a lot when compiling LibreSSL in CLion for me.
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8447d95..fdd2e14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -94,8 +94,6 @@ if(WIN32) | |||
94 | endif() | 94 | endif() |
95 | endif() | 95 | endif() |
96 | 96 | ||
97 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | ||
98 | |||
99 | if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") | 97 | if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") |
100 | if(CMAKE_C_COMPILER MATCHES "gcc") | 98 | if(CMAKE_C_COMPILER MATCHES "gcc") |
101 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fno-strict-aliasing") | 99 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fno-strict-aliasing") |
@@ -184,6 +182,8 @@ if(MSVC) | |||
184 | ${MSVC_DISABLED_WARNINGS_LIST}) | 182 | ${MSVC_DISABLED_WARNINGS_LIST}) |
185 | string(REGEX REPLACE "[/-]W[1234][ ]?" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) | 183 | string(REGEX REPLACE "[/-]W[1234][ ]?" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) |
186 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -MP -W4 ${MSVC_DISABLED_WARNINGS_STR}") | 184 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -MP -W4 ${MSVC_DISABLED_WARNINGS_STR}") |
185 | else() | ||
186 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | ||
187 | endif() | 187 | endif() |
188 | 188 | ||
189 | check_function_exists(asprintf HAVE_ASPRINTF) | 189 | check_function_exists(asprintf HAVE_ASPRINTF) |