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()