From 78970524817b51b3a4ba37581bece44c1c410549 Mon Sep 17 00:00:00 2001 From: Christian Andersen Date: Sun, 4 Feb 2024 19:26:00 +0100 Subject: 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. --- CMakeLists.txt | 4 ++-- 1 file 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) endif() endif() -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") - if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") if(CMAKE_C_COMPILER MATCHES "gcc") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fno-strict-aliasing") @@ -184,6 +182,8 @@ if(MSVC) ${MSVC_DISABLED_WARNINGS_LIST}) string(REGEX REPLACE "[/-]W[1234][ ]?" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -MP -W4 ${MSVC_DISABLED_WARNINGS_STR}") +else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") endif() check_function_exists(asprintf HAVE_ASPRINTF) -- cgit v1.2.3-55-g6feb