[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 115/208: cmake: add CURL_WERROR for enabling "warni
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 115/208: cmake: add CURL_WERROR for enabling "warning as errors" |
Date: |
Wed, 09 Aug 2017 17:35:12 +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 ce81aeb877c242a173f7eecf02dd2723a0cbce42
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Jul 6 12:12:31 2017 +0200
cmake: add CURL_WERROR for enabling "warning as errors"
---
CMakeLists.txt | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 086c37197..25d8fd8f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,6 +72,7 @@ set(OS "\"${CMAKE_SYSTEM_NAME}\"")
include_directories(${PROJECT_BINARY_DIR}/include/curl)
include_directories( ${CURL_SOURCE_DIR}/include )
+option(CURL_WERROR "Turn compiler warnings into errors" OFF)
option(BUILD_CURL_EXE "Set to ON to build curl executable." ON)
option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
@@ -244,6 +245,16 @@ if(BORLAND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
endif(BORLAND)
+if(CURL_WERROR)
+ if(MSVC_VERSION)
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /WX")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_RELEASE} /WX")
+ else()
+ # this assumes clang or gcc style options
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+ endif()
+endif(CURL_WERROR)
+
# If we are on AIX, do the _ALL_SOURCE magic
if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
set(_ALL_SOURCE 1)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 132/208: curl-compilers.m4: disable warning spam with Cygwin's clang, (continued)
- [GNUnet-SVN] [gnurl] 132/208: curl-compilers.m4: disable warning spam with Cygwin's clang, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 169/208: http: fix response code parser to avoid integer overflow, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 158/208: timeval: struct curltime is a struct timeval replacement, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 59/208: maketgz: switch to xz instead of lzma, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 113/208: test506: skip if threaded-resolver, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 110/208: http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 87/208: unit1399: add logging to time comparison, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 98/208: configure: remove checks for 5 functions never used, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 83/208: test1521: fix out-of-tree builds, broken with 467da3af, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 116/208: appveyor: enable CURL_WERROR on all builds, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 115/208: cmake: add CURL_WERROR for enabling "warning as errors",
gnunet <=
- [GNUnet-SVN] [gnurl] 121/208: CURLOPT_POSTFIELDS.3: explain the 100-continue magic better, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 94/208: travis.yml: use --enable-werror on debug builds, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 61/208: libtest/Makefile: remove unused lib1541 variables, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 174/208: BUGS: improved phrasing about security bugs, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 137/208: strerror: Preserve Windows error code in some functions, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 176/208: tests/server/util: fix curltime mistake from 4dee50b9c80f9, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 138/208: curl_setup: always define WIN32_LEAN_AND_MEAN on Windows, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 150/208: rtspd: fix GCC warning after MSVC warning fix, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 36/208: tool_wrte_cb: remove check for config == NULL, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 156/208: multi: mention integer overflow risk if using > 500 million sockets, gnunet, 2017/08/09