]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Speedup cache run when Trilinos is enabled
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Apr 2013 21:50:31 +0000 (21:50 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Apr 2013 21:50:31 +0000 (21:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@29206 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_finalize.cmake

index 879a7e29680e26d02f70f34813af763999f11338..e5d1ae9ab83c9b03e1cd114f70026fec84ed707d 100644 (file)
@@ -132,7 +132,8 @@ _both("DEAL_II_ALLOW_AUTODETECTION = ${DEAL_II_ALLOW_AUTODETECTION}):\n")
 
 
 #
-# Cache for quicker access:
+# Cache for quicker access to avoid the O(n^2) complexity of a loop over
+# _all_ defined variables.
 #
 GET_CMAKE_PROPERTY(_variables VARIABLES)
 FOREACH(_var ${_variables})
@@ -140,7 +141,11 @@ FOREACH(_var ${_variables})
     LIST(APPEND _features "${_var}")
   ELSEIF(_var MATCHES "DEAL_II_COMPONENT")
     LIST(APPEND _components "${_var}")
-  ELSEIF(_var MATCHES "(COMPILER|COMPILE_FLAGS|LINK_FLAGS|LIBRARIES|INCLUDE_PATH|INCLUDE_DIRS|LINKER_FLAGS)")
+  ELSEIF(_var MATCHES "(MPI_CXX_COMPILER|MPI_CXX_COMPILE_FLAGS|MPI_CXX_LINK_FLAGS)")
+    LIST(APPEND _features_config ${_var})
+  ELSEIF(_var MATCHES "(LIBRARIES|INCLUDE_PATH|INCLUDE_DIRS|LINKER_FLAGS)"
+         # Avoid a lot of Trilinos variables:
+         AND (NOT _var MATCHES "_TPL_|_MPI_") )
     LIST(APPEND _features_config ${_var})
   ENDIF()
 ENDFOREACH()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.