From: Matthias Maier Date: Wed, 29 Mar 2023 20:27:39 +0000 (-0500) Subject: CMake: use DEAL_II_WARNING_FLAGS variable in bundled/ directory X-Git-Tag: v9.5.0-rc1~397^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ada9d9914ecb7c42dc83ad6d338c1fe2a249d03c;p=dealii.git CMake: use DEAL_II_WARNING_FLAGS variable in bundled/ directory --- diff --git a/bundled/boost-1.70.0/libs/iostreams/src/CMakeLists.txt b/bundled/boost-1.70.0/libs/iostreams/src/CMakeLists.txt index 4c672a2224..a42462817b 100644 --- a/bundled/boost-1.70.0/libs/iostreams/src/CMakeLists.txt +++ b/bundled/boost-1.70.0/libs/iostreams/src/CMakeLists.txt @@ -20,8 +20,8 @@ set(src_boost_iostreams mapped_file.cpp zlib.cpp ) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-c11-extensions) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-deprecated-copy) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-uninitialized) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-c11-extensions) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-deprecated-copy) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-uninitialized) define_object_library(bundled_boost_iostreams OBJECT ${src_boost_iostreams}) diff --git a/bundled/boost-1.70.0/libs/serialization/src/CMakeLists.txt b/bundled/boost-1.70.0/libs/serialization/src/CMakeLists.txt index 91097eb044..b36e92a4f5 100644 --- a/bundled/boost-1.70.0/libs/serialization/src/CMakeLists.txt +++ b/bundled/boost-1.70.0/libs/serialization/src/CMakeLists.txt @@ -54,8 +54,8 @@ set(src_boost_serialization xml_wiarchive.cpp xml_woarchive.cpp ) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-c11-extensions) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-deprecated-copy) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-uninitialized) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-c11-extensions) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-deprecated-copy) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-uninitialized) define_object_library(bundled_boost_serialization OBJECT ${src_boost_serialization}) diff --git a/bundled/kokkos-3.7.00/CMakeLists.txt b/bundled/kokkos-3.7.00/CMakeLists.txt index 5c225804a5..6f332db424 100644 --- a/bundled/kokkos-3.7.00/CMakeLists.txt +++ b/bundled/kokkos-3.7.00/CMakeLists.txt @@ -64,9 +64,9 @@ set(src_kokkos containers/src/impl/Kokkos_UnorderedMap_impl.cpp ) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-float-conversion) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-missing-field-initializers) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-suggest-override) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-unused-but-set-parameter) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-float-conversion) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-missing-field-initializers) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-suggest-override) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-unused-but-set-parameter) define_object_library(bundled_kokkos OBJECT ${src_kokkos}) diff --git a/bundled/muparser_v2_3_3/CMakeLists.txt b/bundled/muparser_v2_3_3/CMakeLists.txt index 7ab7c80942..1536856859 100644 --- a/bundled/muparser_v2_3_3/CMakeLists.txt +++ b/bundled/muparser_v2_3_3/CMakeLists.txt @@ -16,13 +16,13 @@ # # avoid some annoying warnings... # -strip_flag(DEAL_II_CXX_FLAGS "-Wall") -strip_flag(DEAL_II_CXX_FLAGS "-pedantic") -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-switch) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-nested-anon-types) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-implicit-fallthrough) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-cast-function-type) -enable_if_supported(DEAL_II_CXX_FLAGS -Wno-float-conversion) +strip_flag(DEAL_II_WARNING_FLAGS "-Wall") +strip_flag(DEAL_II_WARNING_FLAGS "-pedantic") +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-switch) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-nested-anon-types) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-implicit-fallthrough) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-cast-function-type) +enable_if_supported(DEAL_II_WARNING_FLAGS -Wno-float-conversion) include_directories( include/ diff --git a/bundled/setup_bundled.cmake b/bundled/setup_bundled.cmake index 98f8edfb6e..2b0fb9d5f0 100644 --- a/bundled/setup_bundled.cmake +++ b/bundled/setup_bundled.cmake @@ -57,7 +57,7 @@ macro(feature_boost_configure_bundled) list(APPEND DEAL_II_DEFINITIONS "BOOST_ALL_NO_LIB") endif() - enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-unused-local-typedefs") + enable_if_supported(DEAL_II_WARNING_FLAGS "-Wno-unused-local-typedefs") list(APPEND DEAL_II_BUNDLED_INCLUDE_DIRS ${BOOST_FOLDER}/include) endmacro() @@ -135,7 +135,7 @@ macro(feature_tbb_configure_bundled) # # We have to disable a bunch of warnings: # - enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-parentheses") + enable_if_supported(DEAL_II_WARNING_FLAGS "-Wno-parentheses") # # tbb uses dlopen/dlclose, so link against libdl.so as well: diff --git a/bundled/tbb-2018_U2/src/CMakeLists.txt b/bundled/tbb-2018_U2/src/CMakeLists.txt index 7a9b9204c6..805801360a 100644 --- a/bundled/tbb-2018_U2/src/CMakeLists.txt +++ b/bundled/tbb-2018_U2/src/CMakeLists.txt @@ -14,11 +14,11 @@ ## --------------------------------------------------------------------- # -# Remove -Wall and -pedantic from DEAL_II_CXX_FLAGS (in directory scope) to +# Remove -Wall and -pedantic from DEAL_II_WARNING_FLAGS (in directory scope) to # avoid some annoying warnings... # -strip_flag(DEAL_II_CXX_FLAGS "-Wall") -strip_flag(DEAL_II_CXX_FLAGS "-pedantic") +strip_flag(DEAL_II_WARNING_FLAGS "-Wall") +strip_flag(DEAL_II_WARNING_FLAGS "-pedantic") # # As discussed in @@ -36,10 +36,10 @@ enable_if_supported(DEAL_II_CXX_FLAGS "-flifetime-dse=1") # # Disable other warnings: # -enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-implicit-fallthrough") -enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-stringop-overflow") -enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-deprecated-copy") -enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-tautological-overlap-compare") +enable_if_supported(DEAL_II_WARNING_FLAGS "-Wno-implicit-fallthrough") +enable_if_supported(DEAL_II_WARNING_FLAGS "-Wno-stringop-overflow") +enable_if_supported(DEAL_II_WARNING_FLAGS "-Wno-deprecated-copy") +enable_if_supported(DEAL_II_WARNING_FLAGS "-Wno-tautological-overlap-compare") diff --git a/bundled/umfpack/AMD/Source/CMakeLists.txt b/bundled/umfpack/AMD/Source/CMakeLists.txt index 1a9fac9a5a..c1f372cef6 100644 --- a/bundled/umfpack/AMD/Source/CMakeLists.txt +++ b/bundled/umfpack/AMD/Source/CMakeLists.txt @@ -13,7 +13,7 @@ ## ## --------------------------------------------------------------------- -strip_flag(DEAL_II_CXX_FLAGS "-Wfloat-conversion") +strip_flag(DEAL_II_WARNING_FLAGS "-Wfloat-conversion") set(src_amd amd_1.cc diff --git a/bundled/umfpack/UMFPACK/Source/CMakeLists.txt b/bundled/umfpack/UMFPACK/Source/CMakeLists.txt index 2c697053ee..c5561c5ba8 100644 --- a/bundled/umfpack/UMFPACK/Source/CMakeLists.txt +++ b/bundled/umfpack/UMFPACK/Source/CMakeLists.txt @@ -285,11 +285,12 @@ # *Shush!* # (Remove locally in this subdirectory) # -strip_flag(DEAL_II_CXX_FLAGS "-pedantic") -strip_flag(DEAL_II_CXX_FLAGS "-Wall") -strip_flag(DEAL_II_CXX_FLAGS "-Wfloat-conversion") -enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-sign-compare") -enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-write-strings") +strip_flag(DEAL_II_WARNING_FLAGS "-pedantic") +strip_flag(DEAL_II_WARNING_FLAGS "-Wall") +strip_flag(DEAL_II_WARNING_FLAGS "-Wextra") +strip_flag(DEAL_II_WARNING_FLAGS "-Wfloat-conversion") +enable_if_supported(DEAL_II_WARNING_FLAGS "-Wno-sign-compare") +enable_if_supported(DEAL_II_WARNING_FLAGS "-Wno-write-strings") #