git: 98e9a0ce7c69 - main - math/cado-nfs: Fix build by disabling -Wall.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Feb 2022 03:00:04 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=98e9a0ce7c6987f8352bba653f234eae364290f8 commit 98e9a0ce7c6987f8352bba653f234eae364290f8 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2022-02-01 02:34:47 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2022-02-01 02:59:59 +0000 math/cado-nfs: Fix build by disabling -Wall. The failure was caused by warnings promoted to errors. Reported by: fallout --- math/cado-nfs/files/patch-CMakeLists.txt | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) 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)")