From 55cfca082d8b70073208fd29451868e0b926cdab Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 1 Jul 2019 11:43:51 +0200 Subject: [PATCH 1/3] enable -Wextra --- cmake/Modules/FindIFEMDeps.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/Modules/FindIFEMDeps.cmake b/cmake/Modules/FindIFEMDeps.cmake index 41ea63b4f..ae7251b35 100644 --- a/cmake/Modules/FindIFEMDeps.cmake +++ b/cmake/Modules/FindIFEMDeps.cmake @@ -276,6 +276,7 @@ endif() include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wall HAS_WALL) +check_cxx_compiler_flag(-Wextra HAS_WEXTRA) check_cxx_compiler_flag(-Wno-parentheses HAS_PARENTHESES) if(HAS_WALL) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") @@ -283,6 +284,9 @@ endif() if(HAS_PARENTHESES) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-parentheses") endif() +if(HAS_WEXTRA) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") +endif() set(IFEM_REGTEST_SCRIPT ${IFEM_PATH}/Apps/Common/scripts/regtest.sh.in) set(IFEM_CLANG_CHECK_TEST_SCRIPT ${IFEM_PATH}/Apps/Common/scripts/clang-check-test.sh.in) From 51362f63f7a3af89740b3b0f3e63d5f9cfd28c5a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 2 Jul 2019 11:13:59 +0200 Subject: [PATCH 2/3] single build job for warning parsing purposes --- jenkins/build-ifem-module.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/build-ifem-module.sh b/jenkins/build-ifem-module.sh index 1fde0b6aa..9df062a4b 100755 --- a/jenkins/build-ifem-module.sh +++ b/jenkins/build-ifem-module.sh @@ -97,7 +97,7 @@ function build_module { cmake $3 -DCMAKE_BUILD_TYPE=Release $1 test $? -eq 0 || exit 1 # Threaded build - nproc=`nproc` + nproc=1 #`nproc` if test $2 -eq 1 then cmake --build . --target testapps -- -j$nproc From c05f06f1b3ea569e0f12a852d9912b77ed6ee13f Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 2 Jul 2019 11:37:42 +0200 Subject: [PATCH 3/3] ignore unused parameter warnings --- cmake/Modules/FindIFEMDeps.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/FindIFEMDeps.cmake b/cmake/Modules/FindIFEMDeps.cmake index ae7251b35..a95ed44e9 100644 --- a/cmake/Modules/FindIFEMDeps.cmake +++ b/cmake/Modules/FindIFEMDeps.cmake @@ -285,7 +285,7 @@ if(HAS_PARENTHESES) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-parentheses") endif() if(HAS_WEXTRA) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wno-unused-parameter") endif() set(IFEM_REGTEST_SCRIPT ${IFEM_PATH}/Apps/Common/scripts/regtest.sh.in)