aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Andersen <csandersen3@gmail.com>2024-02-04 19:26:00 +0100
committerChristian Andersen <csandersen3@gmail.com>2024-02-04 19:26:00 +0100
commit78970524817b51b3a4ba37581bece44c1c410549 (patch)
tree7e76874746255aab06d2220a3b08cc84579ee270
parent3d30672656b840756910809a52ac5fe54c24ec01 (diff)
downloadportable-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.txt4
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()
95endif() 95endif()
96 96
97set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
98
99if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") 97if(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}")
185else()
186 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
187endif() 187endif()
188 188
189check_function_exists(asprintf HAVE_ASPRINTF) 189check_function_exists(asprintf HAVE_ASPRINTF)