aboutsummaryrefslogtreecommitdiff
path: root/math/cado-nfs
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-02-01 02:34:47 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-02-01 02:59:59 +0000
commit98e9a0ce7c6987f8352bba653f234eae364290f8 (patch)
treea7b1010b12dc4ef5076989944115fc7e52a9bd16 /math/cado-nfs
parent0023c50fff7d78a05f915110f6b663624cedfd0f (diff)
downloadports-98e9a0ce7c6987f8352bba653f234eae364290f8.tar.gz
ports-98e9a0ce7c6987f8352bba653f234eae364290f8.zip
math/cado-nfs: Fix build by disabling -Wall.
The failure was caused by warnings promoted to errors. Reported by: fallout
Diffstat (limited to 'math/cado-nfs')
-rw-r--r--math/cado-nfs/files/patch-CMakeLists.txt51
1 files changed, 51 insertions, 0 deletions
diff --git a/math/cado-nfs/files/patch-CMakeLists.txt b/math/cado-nfs/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..674ac4812f6a
--- /dev/null
+++ b/math/cado-nfs/files/patch-CMakeLists.txt
@@ -0,0 +1,51 @@
+- workaround for the failure: error: variable 'total_weight' set but not used [-Werror,-Wunused-but-set-variable]
+
+--- CMakeLists.txt.orig 2022-01-31 23:16:04 UTC
++++ CMakeLists.txt
+@@ -146,7 +146,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()
+@@ -156,7 +156,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
+ 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()
+@@ -187,8 +187,8 @@ endif()
+
+ if(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.
+@@ -206,7 +206,7 @@ endif()
+
+ 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
+@@ -226,7 +226,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "^Clang")
+ set (CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
+ set (HAVE_CXX11 1)
+ message(STATUS "Enabling C++11 support")
+- set (CMAKE_CXX_FLAGS "-std=c++11 -W -Wall ${CMAKE_CXX_FLAGS}")
++ set (CMAKE_CXX_FLAGS "-std=c++11 -W ${CMAKE_CXX_FLAGS}")
+ endif()
+ endif()
+ message(STATUS "CFLAGS=${CMAKE_C_FLAGS} (synthetized)")