[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 181/208: CMake: set MSVC warning level to 4
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 181/208: CMake: set MSVC warning level to 4 |
Date: |
Wed, 09 Aug 2017 17:36:18 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.
commit 866e02935deb28373130116dac578d84e057a03e
Author: Marcel Raad <address@hidden>
AuthorDate: Tue Jul 18 18:46:53 2017 +0200
CMake: set MSVC warning level to 4
The MSVC warning level defaults to 3 in CMake. Change it to 4, which is
consistent with the Visual Studio and NMake builds. Disable level 4
warning C4127 for the library and additionally C4306 for the test
servers to get a clean CURL_WERROR build as that warning is raised in
some macros in older Visual Studio versions.
Ref: https://github.com/curl/curl/pull/1667#issuecomment-314082794
Closes https://github.com/curl/curl/pull/1711
---
CMakeLists.txt | 5 +++++
lib/CMakeLists.txt | 1 +
tests/server/CMakeLists.txt | 4 ++++
3 files changed, 10 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f21d89e8f..171941128 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1161,6 +1161,11 @@ endif(WIN32)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+ if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
+ string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ else(CMAKE_C_FLAGS MATCHES "/W[0-4]")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
+ endif(CMAKE_C_FLAGS MATCHES "/W[0-4]")
endif(MSVC)
# Ugly (but functional) way to include "Makefile.inc" by transforming it (=
regenerate it).
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 667754480..d6c996189 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -12,6 +12,7 @@ list(APPEND HHEADERS
if(MSVC)
list(APPEND CSOURCES libcurl.rc)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127")
endif()
# SET(CSOURCES
diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt
index e456a94df..cfc1434cd 100644
--- a/tests/server/CMakeLists.txt
+++ b/tests/server/CMakeLists.txt
@@ -1,5 +1,9 @@
set(TARGET_LABEL_PREFIX "Test server ")
+if(MSVC)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4306")
+endif()
+
function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
add_executable( ${TEST_NAME} ${ARGN} )
string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 26/208: HTTPS-Proxy: don't offer h2 for https proxy connections, (continued)
- [GNUnet-SVN] [gnurl] 26/208: HTTPS-Proxy: don't offer h2 for https proxy connections, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 155/208: checksrc: escape open brace in regex, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 147/208: rtspd: fix MSVC level 4 warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 64/208: progress: fix "time spent", broke in adef394ac, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 162/208: splay: fix signed/unsigned mismatch warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 204/208: configure: fix recv/send/select detection on Android, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 186/208: darwin: silence compiler warnings, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 172/208: multi: fix request timer management, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 194/208: darwinssl: fix compiler warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 149/208: libtest: fix MSVC warning C4706, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 181/208: CMake: set MSVC warning level to 4,
gnunet <=
- [GNUnet-SVN] [gnurl] 202/208: test1427: verify command line parser integer overflow detection, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 200/208: glob: do not continue parsing after a strtoul() overflow range, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 203/208: ax_code_coverage.m4: update to latest version, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 180/208: CURLOPT_NETRC.3: fix typo in 7e48aa386156f9c2, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 165/208: RELEASE-NOTES: synced with 001701c47, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 179/208: CURLOPT_NETRC.3: mention the file name on windows, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 197/208: easy_events: make event data static, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 177/208: travis: build osx with openssl too, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 185/208: BUILD.WINDOWS: mention buildconf.bat for builds off git, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 207/208: RELEASE-NOTES: curl 7.55.0, gnunet, 2017/08/09