diff options
author | Christian Andersen <csandersen3@gmail.com> | 2024-02-04 19:26:00 +0100 |
---|---|---|
committer | Christian Andersen <csandersen3@gmail.com> | 2024-02-04 19:26:00 +0100 |
commit | 78970524817b51b3a4ba37581bece44c1c410549 (patch) | |
tree | 7e76874746255aab06d2220a3b08cc84579ee270 | |
parent | 3d30672656b840756910809a52ac5fe54c24ec01 (diff) | |
download | portable-78970524817b51b3a4ba37581bece44c1c410549.tar.gz portable-78970524817b51b3a4ba37581bece44c1c410549.tar.bz2 portable-78970524817b51b3a4ba37581bece44c1c410549.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 3b8c1aa..3f8cbb4 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) |