From 7ad37a2bd85cd7e2ffe673749ae5e1eefdee1ece Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 5 Jun 2013 14:49:59 +0000 Subject: [PATCH] CMake: Some small changes for DEAL_II_WITH_64BIT_INDICES - Bugfix: Prevent DEAL_II_FORCE_AUTODETECTION from unsetting DEAL_II_WITH_64BIT_INDICES - Also document DEAL_II_WITH_64BIT_INDICES in doc/development/Config.sample - Do not mark DEAL_II_WITH_64BIT_INDICES as advanced as it already shows up in the summary and detailes logs. git-svn-id: https://svn.dealii.org/trunk@29755 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_cached_variables.cmake | 26 ++++++++++++---------- deal.II/doc/development/Config.sample | 5 +++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index e38c00f14b..4213865644 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -162,6 +162,17 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE BOOL ) MARK_AS_ADVANCED(CMAKE_INSTALL_RPATH_USE_LINK_PATH) +# +# Define the variable that defines whether we should use 32- or 64-bit +# global DoF indices. +# +OPTION(DEAL_II_WITH_64BIT_INDICES + "If set to ON, then use 64-bit data types to represent global degree of freedom indices. The default is to OFF. You only want to set this to ON if you will solve problems with more than 2^31 (approximately 2 billion) unknowns. If set to ON, you also need to ensure that both Trilinos and/or PETSc support 64-bit indices." + OFF + ) + + + # # Tell the user very prominently, that we're doing things differently w.r.t # CMAKE_(C|CXX)_FLAGS_(DEBUG|RELEASE) @@ -238,17 +249,6 @@ FOREACH(_flag ${DEAL_II_USED_FLAGS}) ENDFOREACH() -# -# Define the variable that defines whether we should use 32- or 64-bit -# global DoF indices. -# -OPTION(DEAL_II_WITH_64BIT_INDICES - "If set to ON, then use 64-bit data types to represent global degree of freedom indices. The default is to OFF. You only want to set this to ON if you will solve problems with more than 2^31 (approximately 2 billion) unknowns. If set to ON, you also need to ensure that both Trilinos and/or PETSc support 64-bit indices." - OFF - ) -MARK_AS_ADVANCED(DEAL_II_WITH_64BIT_INDICES) - - # # Finally, read in CFLAGS, CXXFLAGS and LDFLAGS from environment and # prepend them to the saved variables: @@ -293,7 +293,9 @@ FOREACH(_var ${_res}) # If DEAL_II_FORCE_AUTODETECTION is set undefine all feature toggles # DEAL_II_WITH_* prior to configure: # - IF(DEAL_II_FORCE_AUTODETECTION AND _var MATCHES "^DEAL_II_WITH_") + IF(DEAL_II_FORCE_AUTODETECTION AND _var MATCHES "^DEAL_II_WITH_" + # Exclude FEATURES that do not represent external libraries: + AND NOT _var MATCHES "^DEAL_II_WITH_64BIT_INDICES" ) UNSET(${_var} CACHE) ENDIF() ENDFOREACH() diff --git a/deal.II/doc/development/Config.sample b/deal.II/doc/development/Config.sample index 528eb299e8..393634f337 100644 --- a/deal.II/doc/development/Config.sample +++ b/deal.II/doc/development/Config.sample @@ -115,6 +115,11 @@ # "Set the rpath of the library to the external link pathes on installation" # ) # +# SET(DEAL_II_WITH_64BIT_INDICES "OFF" CACHE BOOL +# "If set to ON, then use 64-bit data types to represent global degree of freedom indices. The default is to OFF. You only want to set this to ON if you will solve problems with more than 2^31 (approximately 2 billion) unknowns. If set to ON, you also need to ensure that both Trilinos and/or PETSc support 64-bit indices." +# ) +# +# ########################################################################### -- 2.39.5