From: maier Date: Mon, 25 Mar 2013 15:10:41 +0000 (+0000) Subject: CMake: Resolve a cache invalidation problem X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd5d4a8137b5a41b48e1956f81262c92f1c1934;p=dealii-svn.git CMake: Resolve a cache invalidation problem git-svn-id: https://svn.dealii.org/trunk@29028 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/bundled/CMakeLists.txt b/deal.II/bundled/CMakeLists.txt index 12fc4d24bc..70983ef9f7 100644 --- a/deal.II/bundled/CMakeLists.txt +++ b/deal.II/bundled/CMakeLists.txt @@ -98,6 +98,14 @@ OPTION(DEAL_II_FORCE_BUNDLED_UMFPACK "Always use the bundled umfpack library instead of an external one." OFF) +# +# Resolve a cache invalidation problem by searching for these flags +# unconditionally. They're used for compiling the sources in +# ${UMFPACK_FOLDER}/UMFPACK/Source depending on cached variables. +# +ENABLE_IF_SUPPORTED(_dummy "-Wno-sign-compare") +ENABLE_IF_SUPPORTED(_dummy "-Wno-write-strings") + IF(FEATURE_UMFPACK_BUNDLED_CONFIGURED) ADD_SUBDIRECTORY(${UMFPACK_FOLDER}/UMFPACK/Source) ADD_SUBDIRECTORY(${UMFPACK_FOLDER}/AMD/Source) diff --git a/deal.II/cmake/configure/configure_1_threads.cmake b/deal.II/cmake/configure/configure_1_threads.cmake index 0beb2d1af0..f2df405156 100644 --- a/deal.II/cmake/configure/configure_1_threads.cmake +++ b/deal.II/cmake/configure/configure_1_threads.cmake @@ -135,6 +135,15 @@ MACRO(FEATURE_THREADS_CONFIGURE_EXTERNAL) ENDMACRO() +# +# Resolve a cache invalidation problem by searching for these flags +# unconditionally. They're used in FEATURE_THREADS_CONFIGURE_BUNDLED +# depending on cached variables. +# +ENABLE_IF_SUPPORTED(_dummy "-Wno-parentheses") +ENABLE_IF_SUPPORTED(_dummy "-Wno-long-long") + + MACRO(FEATURE_THREADS_CONFIGURE_BUNDLED) # # Setup threading (before configuring our build...) diff --git a/deal.II/cmake/configure/configure_petsc.cmake b/deal.II/cmake/configure/configure_petsc.cmake index 4a526e7f77..eaad928c7d 100644 --- a/deal.II/cmake/configure/configure_petsc.cmake +++ b/deal.II/cmake/configure/configure_petsc.cmake @@ -80,6 +80,13 @@ MACRO(FEATURE_PETSC_FIND_EXTERNAL var) ENDMACRO() +# +# Resolve a cache invalidation problem by searching for this flag +# unconditionally. It is used in FEATURE_PETSC_CONFIGURE_EXTERNAL +# depending on cached variables. +# +ENABLE_IF_SUPPORTED(_dummy "-Wno-long-long") + MACRO(FEATURE_PETSC_CONFIGURE_EXTERNAL) INCLUDE_DIRECTORIES(${PETSC_INCLUDE_DIRS}) diff --git a/deal.II/cmake/configure/configure_trilinos.cmake b/deal.II/cmake/configure/configure_trilinos.cmake index df202b6d68..90b5c2760e 100644 --- a/deal.II/cmake/configure/configure_trilinos.cmake +++ b/deal.II/cmake/configure/configure_trilinos.cmake @@ -168,18 +168,19 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) UNSET(TRILINOS_SUPPORTS_CPP11 CACHE) UNSET(TRILINOS_HAS_C99_TR1_WORKAROUND CACHE) - # - # TODO: Resolve this cache invalidation issue and then put these checks - # back into FEATURE_TRILINO_CONFIGURE_EXTERNAL where they belong to. - # - ENABLE_IF_SUPPORTED(TRILINOS_DISABLE_WARNING_FLAGS "-Wno-unused") - ENABLE_IF_SUPPORTED(TRILINOS_DISABLE_WARNING_FLAGS "-Wno-extra") - ENABLE_IF_SUPPORTED(TRILINOS_DISABLE_WARNING_FLAGS "-Wno-overloaded-virtual") - ENDIF(TRILINOS_FOUND) ENDMACRO() +# +# Resolve a cache invalidation problem by searching for these flags +# unconditionally. They're used in FEATURE_TRILINOS_CONFIGURE_EXTERNAL +# depending on cached variables. +# +ENABLE_IF_SUPPORTED(_dummy "-Wno-unused") +ENABLE_IF_SUPPORTED(_dummy "-Wno-extra") +ENABLE_IF_SUPPORTED(_dummy "-Wno-overloaded-virtual") + MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL) INCLUDE_DIRECTORIES(${TRILINOS_INCLUDE_DIRS}) @@ -205,7 +206,9 @@ MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL) # # Disable a bunch of warnings caused by Trilinos headers: # - ADD_FLAGS(CMAKE_CXX_FLAGS "${TRILINOS_DISABLE_WARNING_FLAGS}") + ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused") + ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-extra") + ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-overloaded-virtual") ENDMACRO()