From 1a251aa5e4c594362159bf518741e63269c67995 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Thu, 16 May 2024 06:44:05 -0700 Subject: [PATCH] add -Wshadow to ENABLE_ALL_WARNINGS --- cmake/SundialsSetupCompilers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/SundialsSetupCompilers.cmake b/cmake/SundialsSetupCompilers.cmake index 366af04a77..a3810541d0 100644 --- a/cmake/SundialsSetupCompilers.cmake +++ b/cmake/SundialsSetupCompilers.cmake @@ -76,8 +76,8 @@ endif() if(ENABLE_ALL_WARNINGS) message(STATUS "Enabling all compiler warnings") - set(CMAKE_C_FLAGS "-Wall -Wpedantic -Wextra -Wmissing-declarations -Wcast-qual -Wdouble-promotion -Wno-unused-parameter -Wno-unused-function ${CMAKE_C_FLAGS}") - set(CMAKE_CXX_FLAGS "-Wall -Wpedantic -Wextra -Wmissing-declarations -Wcast-qual -Wdouble-promotion -Wno-unused-parameter -Wno-unused-function ${CMAKE_CXX_FLAGS}") + set(CMAKE_C_FLAGS "-Wall -Wpedantic -Wextra -Wshadow -Wmissing-declarations -Wcast-qual -Wdouble-promotion -Wno-unused-parameter -Wno-unused-function ${CMAKE_C_FLAGS}") + set(CMAKE_CXX_FLAGS "-Wall -Wpedantic -Wextra -Wshadow -Wmissing-declarations -Wcast-qual -Wdouble-promotion -Wno-unused-parameter -Wno-unused-function ${CMAKE_CXX_FLAGS}") set(CMAKE_Fortran_FLAGS "-Wall -Wpedantic -Wno-unused-dummy-argument -Wno-c-binding-type -ffpe-summary=none ${CMAKE_Fortran_FLAGS}") endif()