1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
- workaround for the failure: error: variable 'total_weight' set but not used [-Werror,-Wunused-but-set-variable]
--- CMakeLists.txt.orig 2024-03-18 08:56:37 UTC
+++ CMakeLists.txt
@@ -149,7 +149,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
# prevents the definition of __STRICT_ANSI__
#
# Ditto for C++, with the c++98/gnu++98 subtlety.
- set (CMAKE_C_FLAGS "-W -Wall ${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "-W ${CMAKE_C_FLAGS}")
if (MINGW)
set (CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
else()
@@ -159,7 +159,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- set (CMAKE_CXX_FLAGS "-W -Wall ${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "-W ${CMAKE_CXX_FLAGS}")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(FATAL_ERROR "cado-nfs requires gcc version 5 or greater")
endif()
@@ -201,8 +201,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
message(STATUS "Enabling C++11 support")
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
message(STATUS "Applying flags for icc")
- set (CMAKE_C_FLAGS "-W -Wall -wd13200,13203 ${CMAKE_C_FLAGS}")
- set (CMAKE_CXX_FLAGS "-W -Wall -wd13200,13203,3058 ${CMAKE_CXX_FLAGS}")
+ set (CMAKE_C_FLAGS "-W -wd13200,13203 ${CMAKE_C_FLAGS}")
+ set (CMAKE_CXX_FLAGS "-W -wd13200,13203,3058 ${CMAKE_CXX_FLAGS}")
set (CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
# only icc>=15 is full c++11 compliant, it seems. But 14 will do.
@@ -220,7 +220,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" OR CMAKE_H
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" OR CMAKE_HOST_SYSTEM_NAME
STREQUAL "Darwin" AND CMAKE_C_COMPILER_ID MATCHES "Clang" )
- set (CMAKE_C_FLAGS "-std=c99 -W -Wall ${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "-std=c99 -W ${CMAKE_C_FLAGS}")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" OR CMAKE_HOST_SYSTEM_NAME
@@ -232,7 +232,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "^Clang")
message(STATUS "Enabling C++11 support")
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "^Clang")
- set (CMAKE_CXX_FLAGS "-W -Wall ${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "-W ${CMAKE_CXX_FLAGS}")
# According to http://clang.llvm.org/cxx_status.html
# Caveat: Apple's clang identifies itself as plain Clang on some
# occasions... I don't exactly know when and how, but there's some
|