]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Big compilation variables cleanup
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 15 Dec 2013 16:37:29 +0000 (16:37 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 15 Dec 2013 16:37:29 +0000 (16:37 +0000)
 - Be consistent in naming: All compiler / linker flag variables and
   compile definition variables now start with DEAL_II_*

 - For compatibility: Rename the corresponding CMAKE_* variables to
   DEAL_II_* and log the fact in the configure output.

git-svn-id: https://svn.dealii.org/trunk@32019 0785d39b-7218-0410-832d-ea1e28bc413d

27 files changed:
deal.II/bundled/functionparser/CMakeLists.txt
deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt
deal.II/bundled/umfpack/UMFPACK/Source/CMakeLists.txt
deal.II/cmake/checks/check_01_cxx_features.cmake
deal.II/cmake/checks/check_02_system_features.cmake
deal.II/cmake/checks/check_03_compiler_bugs.cmake
deal.II/cmake/config/CMakeLists.txt
deal.II/cmake/config/Config.cmake.in
deal.II/cmake/config/Make.global_options.in
deal.II/cmake/configure/configure_1_threads.cmake
deal.II/cmake/configure/configure_2_trilinos.cmake
deal.II/cmake/configure/configure_3_petsc.cmake
deal.II/cmake/macros/macro_deal_ii_add_library.cmake
deal.II/cmake/macros/macro_deal_ii_insource_setup_target.cmake
deal.II/cmake/macros/macro_register_feature.cmake
deal.II/cmake/macros/macro_reset_cmake_required.cmake
deal.II/cmake/setup_cached_variables.cmake
deal.II/cmake/setup_compiler_flags.cmake
deal.II/cmake/setup_compiler_flags_gnu.cmake
deal.II/cmake/setup_compiler_flags_intel.cmake
deal.II/cmake/setup_compiler_flags_msvc.cmake
deal.II/cmake/setup_finalize.cmake
deal.II/doc/developers/cmake-internals.html
deal.II/doc/developers/porting.html
deal.II/doc/users/Config.sample
deal.II/doc/users/cmake.html
deal.II/doc/users/cmakelists.html

index eaf39a348cf3e8346150521acad32e92b1878269..0b217e8c4e6f6712ebd895b910ad067425c6a309 100644 (file)
 ## ---------------------------------------------------------------------
 
 #
-# Remove -Wall and -pedantic from CMAKE_CXX_FLAGS (in directory scope) to
+# Remove -Wall and -pedantic from DEAL_II_CXX_FLAGS (in directory scope) to
 # avoid some annoying warnings...
 #
-STRIP_FLAG(CMAKE_CXX_FLAGS "-Wall")
-STRIP_FLAG(CMAKE_CXX_FLAGS "-pedantic")
+STRIP_FLAG(DEAL_II_CXX_FLAGS "-Wall")
+STRIP_FLAG(DEAL_II_CXX_FLAGS "-pedantic")
 
 DEAL_II_ADD_LIBRARY(obj_functionparser OBJECT
   fparser.cc
index 9604dad1b6b8122ab61f046b28306fd7c5c23acd..8e764b44f3273570b39e806ac86e3c3553b0c8f1 100644 (file)
 ## ---------------------------------------------------------------------
 
 #
-# Remove -Wall and -pedantic from CMAKE_CXX_FLAGS (in directory scope) to
+# Remove -Wall and -pedantic from DEAL_II_CXX_FLAGS (in directory scope) to
 # avoid some annoying warnings...
 #
-STRIP_FLAG(CMAKE_CXX_FLAGS "-Wall")
-STRIP_FLAG(CMAKE_CXX_FLAGS "-pedantic")
+STRIP_FLAG(DEAL_II_CXX_FLAGS "-Wall")
+STRIP_FLAG(DEAL_II_CXX_FLAGS "-pedantic")
 
 SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
 INCLUDE_DIRECTORIES(
index 4761b3c04137961a5f3b91a2de5a8bf3d87970b4..16f03377d4e0528f39164982f67210e2bb2043d1 100644 (file)
 #
 # *Shush!*
 #
-STRIP_FLAG(CMAKE_CXX_FLAGS "-pedantic")
-STRIP_FLAG(CMAKE_CXX_FLAGS "-Wall")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-sign-compare")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-write-strings")
+STRIP_FLAG(DEAL_II_CXX_FLAGS "-pedantic")
+STRIP_FLAG(DEAL_II_CXX_FLAGS "-Wall")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-sign-compare")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-write-strings")
 
 SET(src_umfpack_UMF
   umf_2by2.cc
index 84a9d178a210d9ec426cbac26b5f5ac80fda535d..0f5b0865f29886a0df0eca68ce416e50bb6cda84 100644 (file)
@@ -170,7 +170,7 @@ IF(DEAL_II_HAVE_CXX11_FLAG)
 
     SET(DEAL_II_USE_CXX11 TRUE)
 
-    ADD_FLAGS(CMAKE_CXX_FLAGS "${DEAL_II_CXX11_FLAG}")
+    ADD_FLAGS(DEAL_II_CXX_FLAGS "${DEAL_II_CXX11_FLAG}")
 
   ELSE()
     MESSAGE(STATUS "Insufficient C++11 support. Disabling ${DEAL_II_CXX11_FLAG}.")
index cc0c675a6adf58ec47f9502524572f79158c547f..20c158c6361c6f52a20857440ec35f32c7f73054 100644 (file)
@@ -89,7 +89,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
   # warnings. However, newer gccs on that platform do not have
   # this flag any more, so check whether we can indeed do this
   #
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-double")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-double")
 
   #
   # On Mac OS X, -rdynamic is accepted by the compiler (i.e.
index f650c69ec964003363e4e693c6d609807c6fc056..ea8d16f293207e1012d1beb18b2ff333e4be173f 100644 (file)
@@ -42,7 +42,7 @@ POP_TEST_FLAG()
 POP_TEST_FLAG()
 
 IF(DEAL_II_WRETURN_TYPE_CONST_QUALIFIER_BUG)
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS -Wno-return-type)
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS -Wno-return-type)
 ENDIF()
 
 
@@ -59,7 +59,7 @@ ENDIF()
 #
 IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
    CMAKE_CXX_COMPILER_VERSION MATCHES "4.4.")
-  STRIP_FLAG(CMAKE_CXX_FLAGS "-pedantic")
+  STRIP_FLAG(DEAL_II_CXX_FLAGS "-pedantic")
 ENDIF()
 
 
@@ -253,7 +253,7 @@ CHECK_CXX_COMPILER_BUG(
   DEAL_II_TYPE_QUALIFIER_BUG)
 
 IF(DEAL_II_TYPE_QUALIFIER_BUG)
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS -Wno-ignored-qualifiers)
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS -Wno-ignored-qualifiers)
 ENDIF()
 
 
@@ -344,7 +344,7 @@ IF( DEAL_II_ICC_NUMERICLIMITS_BUG OR
   MESSAGE(STATUS
     "Intel C++11 bug found, disabling C++11 support"
     )
-  STRIP_FLAG(CMAKE_CXX_FLAGS "${DEAL_II_CXX11_FLAG}")
+  STRIP_FLAG(DEAL_II_CXX_FLAGS "${DEAL_II_CXX11_FLAG}")
   SET(DEAL_II_CAN_USE_CXX1X FALSE)
   SET(DEAL_II_USE_CXX11 FALSE)
 ENDIF()
@@ -402,7 +402,7 @@ IF(DEAL_II_MAC_OSX_C99_BUG)
   MESSAGE(STATUS
     "Mac OS-X C99 bug found, disabling C++11 support"
     )
-  STRIP_FLAG(CMAKE_CXX_FLAGS "${DEAL_II_CXX11_FLAG}")
+  STRIP_FLAG(DEAL_II_CXX_FLAGS "${DEAL_II_CXX11_FLAG}")
   SET(DEAL_II_CAN_USE_CXX1X FALSE)
   SET(DEAL_II_USE_CXX11 FALSE)
 ENDIF()
index e499bafbee8040488bd14876e0194efcaa958fec..987df97bf968698b076df7feadc4edd56e18a2ea 100644 (file)
@@ -74,11 +74,11 @@ INSTALL(FILES # for installation:
 ########################################################################
 
 #
-# Strip -Wno-deprecated from CMAKE_CXX_FLAGS so that deprecation warnings
+# Strip -Wno-deprecated from DEAL_II_CXX_FLAGS so that deprecation warnings
 # are actually shown for user code:
 #
-STRIP_FLAG(CMAKE_CXX_FLAGS "-Wno-deprecated")
-STRIP_FLAG(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations")
+STRIP_FLAG(DEAL_II_CXX_FLAGS "-Wno-deprecated")
+STRIP_FLAG(DEAL_II_CXX_FLAGS "-Wno-deprecated-declarations")
 
 #
 # Populate a bunch of CONFIG_* variables with useful information:
@@ -317,7 +317,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
     # Set up our linker flags:
     #
     SET(MAKEFILE_LDFLAGS_${build}
-      "${CMAKE_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}} ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${build}}"
+      "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}} ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${build}}"
       )
   ENDFOREACH()
 
index 153fb13f9e68cb6e7e249a681be5de8d00da553d..a3e6fbcdcb116ef65adbbb0f6eb11343782d75d0 100644 (file)
@@ -109,7 +109,7 @@ ENDFOREACH()
 SET(DEAL_II_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
 
 # used for all targets:
-SET(DEAL_II_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
+SET(DEAL_II_CXX_FLAGS "@DEAL_II_CXX_FLAGS@")
 
 # _additionally_ used for debug targets:
 SET(DEAL_II_CXX_FLAGS_DEBUG "@DEAL_II_CXX_FLAGS_DEBUG@")
index 832a9237b1d0acbb4c20f1910a993252cb311d63..a5f35b00d78599611ea8da6613266afe7d7e757f 100644 (file)
@@ -87,8 +87,8 @@ INCLUDE = @MAKEFILE_INCLUDE_DIRS@
 
 
 # compiler flags for debug and optimized mode
-CXXFLAGS.g   = @CMAKE_CXX_FLAGS@ @DEAL_II_CXX_FLAGS_DEBUG@ @MAKEFILE_DEFINITIONS@ @MAKEFILE_DEFINITIONS_DEBUG@ $(INCLUDE)
-CXXFLAGS.o   = @CMAKE_CXX_FLAGS@ @DEAL_II_CXX_FLAGS_RELEASE@ @MAKEFILE_DEFINITIONS@ @MAKEFILE_DEFINITIONS_RELEASE@ $(INCLUDE)
+CXXFLAGS.g   = @DEAL_II_CXX_FLAGS@ @DEAL_II_CXX_FLAGS_DEBUG@ @MAKEFILE_DEFINITIONS@ @MAKEFILE_DEFINITIONS_DEBUG@ $(INCLUDE)
+CXXFLAGS.o   = @DEAL_II_CXX_FLAGS@ @DEAL_II_CXX_FLAGS_RELEASE@ @MAKEFILE_DEFINITIONS@ @MAKEFILE_DEFINITIONS_RELEASE@ $(INCLUDE)
 
 ifeq ($(enable-threads),yes)
   MT = MT
index fb4cce06760bec6f1e724634045007a381e666ca..182f7d3bc8a4c6ab4fbaa433e0a691d0be82bf60 100644 (file)
@@ -185,8 +185,8 @@ MACRO(FEATURE_THREADS_CONFIGURE_BUNDLED)
   #
   # We have to disable a bunch of warnings:
   #
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-parentheses")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-parentheses")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-long")
 
   #
   # Add some definitions to use the header files in debug mode:
index 0060efb50b07196606c83fddc4faff52554f4425..d76b3cbf208d6d11983af00e9ac0f37ea3790b42 100644 (file)
@@ -208,9 +208,9 @@ MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL)
   #
   # Disable a bunch of warnings caused by Trilinos headers:
   #
-  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")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-extra")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-overloaded-virtual")
 
 ENDMACRO()
 
index 3627e7c49c1f239b06458fd01c36bb0aa99459e2..6ed8f62c24e4e592dabb81007dda802e0ecd4e4a 100644 (file)
@@ -120,7 +120,7 @@ MACRO(FEATURE_PETSC_CONFIGURE_EXTERNAL)
   #
   # Disable a bunch of warnings when compiling with petsc:
   #
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-long")
 
   SET(DEAL_II_EXPAND_PETSC_VECTOR "PETScWrappers::Vector")
   SET(DEAL_II_EXPAND_PETSC_BLOCKVECTOR "PETScWrappers::BlockVector")
index 26c7ee3b81436b67beb33652ab683e82b9fa732a..8efacf6dfe5b3c91c08a5348fd9ee1d8e244230c 100644 (file)
@@ -25,7 +25,7 @@
 #
 # as well as the global (for all build types)
 #   DEAL_II_LINKER_FLAGS
-#   CMAKE_CXX_FLAGS
+#   DEAL_II_CXX_FLAGS
 #   DEAL_II_DEFINITIONS
 #
 
@@ -41,7 +41,7 @@ MACRO(DEAL_II_ADD_LIBRARY _library)
     SET_TARGET_PROPERTIES(${_library}.${_build_lowercase} PROPERTIES
       LINK_FLAGS "${DEAL_II_LINKER_FLAGS};${DEAL_II_LINKER_FLAGS_${_build}}"
       COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
-      COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}"
+      COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
       LINKER_LANGUAGE "CXX"
       )
 
index daa070b2aec5b3a388f24c23906df1d1951f63c5..1d04685c1a9e1a66b5d8b60e9db406fd6fe118c0 100644 (file)
@@ -30,7 +30,7 @@ MACRO(DEAL_II_INSOURCE_SETUP_TARGET _target _build)
   SET_TARGET_PROPERTIES(${_target} PROPERTIES
     LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
     COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
-    COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}"
+    COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
     LINKER_LANGUAGE "CXX"
     RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${_test_short}"
     )
index 4184a22c27a1070275a4c47846173b7849f4c767..22dffc44de670eb50ed1a5f0a5cf34368365541c 100644 (file)
@@ -31,7 +31,7 @@
 #     DEAL_II_LINKER_FLAGS
 #
 #   - add ${feature}_CXX_FLAGS and ${feature}_COMPILE_FLAGS to
-#     CMAKE_CXX_FLAGS
+#     DEAL_II_CXX_FLAGS
 #
 #   - add ${feature}_LIBRARIES to the list of deal.II libraries depending
 #     on general, optimized or debug keyword
@@ -59,7 +59,7 @@ MACRO(REGISTER_FEATURE _feature)
   # variables for compiler flags:
   FOREACH(_var ${_feature}_CXX_FLAGS ${_feature}_COMPILE_FLAGS)
     IF(DEFINED ${_var})
-      ADD_FLAGS(CMAKE_CXX_FLAGS "${${_var}}")
+      ADD_FLAGS(DEAL_II_CXX_FLAGS "${${_var}}")
     ENDIF()
   ENDFOREACH()
 
index 0f2865a3d75a2d425814a21702952528be42f069..53a481878667dd8a0de7abe590e87371472a3acc 100644 (file)
@@ -23,7 +23,7 @@
 #
 
 MACRO(RESET_CMAKE_REQUIRED)
-  SET(CMAKE_REQUIRED_FLAGS ${CMAKE_CXX_FLAGS_SAVED})
+  SET(CMAKE_REQUIRED_FLAGS ${DEAL_II_CXX_FLAGS_SAVED})
   SET(CMAKE_REQUIRED_INCLUDES)
   SET(CMAKE_REQUIRED_LIBRARIES)
 ENDMACRO()
index 6302955d101a9fec4eb9ae939b56564dcb7ea537..1d0196086641080f5b065a4b501b1bbae152ba1a 100644 (file)
 #     DEAL_II_PREFER_STATIC_LIBS
 #     DEAL_II_STATIC_EXECUTABLE
 #     CMAKE_INSTALL_RPATH_USE_LINK_PATH
-#     CMAKE_CXX_FLAGS                   *)
-#     DEAL_II_LINKER_FLAGS              *)
+#     DEAL_II_CXX_FLAGS                    *)
 #     DEAL_II_CXX_FLAGS_DEBUG
-#     DEAL_II_LINKER_FLAGS_DEBUG
 #     DEAL_II_CXX_FLAGS_RELEASE
+#     DEAL_II_LINKER_FLAGS                 *)
+#     DEAL_II_LINKER_FLAGS_DEBUG
 #     DEAL_II_LINKER_FLAGS_RELEASE
+#
 #     DEAL_II_WITH_64BIT_INDICES
 #
 # *)  May also be set via environment variable (CXXFLAGS, LDFLAGS)
@@ -53,6 +54,9 @@
 #     overwritten by environment)
 #
 
+MESSAGE(STATUS "")
+MESSAGE(STATUS "Set up cached variables.")
+
 
 ########################################################################
 #                                                                      #
@@ -105,6 +109,7 @@ OPTION(DEAL_II_FORCE_AUTODETECTION
   )
 
 
+
 ########################################################################
 #                                                                      #
 #                       Compilation and linking:                       #
@@ -114,16 +119,15 @@ OPTION(DEAL_II_FORCE_AUTODETECTION
 #
 # Setup CMAKE_BUILD_TYPE:
 #
+
 SET(CMAKE_BUILD_TYPE
   "DebugRelease"
   CACHE STRING
   "Choose the type of build, options are: Debug, Release and DebugRelease."
   )
 
-#
 # This is cruel, I know. But it is better to only have a known number of
 # options for CMAKE_BUILD_TYPE...
-#
 IF( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND
     NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" AND
     NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" )
@@ -132,6 +136,9 @@ IF( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND
     )
 ENDIF()
 
+#
+# Configuration behaviour:
+#
 
 OPTION(DEAL_II_ALLOW_PLATFORM_INTROSPECTION
   "Allow platform introspection for CPU command sets, SSE and AVX"
@@ -178,11 +185,6 @@ IF(DEAL_II_STATIC_EXECUTABLE)
     )
 ENDIF()
 
-
-#
-# Set CMAKE_INSTALL_RPATH_USE_LINK_PATH to default to ON and promote to
-# cache so that the user can see the value.
-#
 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE BOOL
   "Set the rpath of the library to the external link pathes on installation"
   )
@@ -190,47 +192,43 @@ 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.
+# Translate CMake specific variables to deal.II naming:
 #
-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)
-#
-FOREACH(_flag
-  CXX_FLAGS_RELEASE
-  CXX_FLAGS_DEBUG
-  SHARED_LINKER_FLAGS_RELEASE
-  SHARED_LINKER_FLAGS_DEBUG
-  )
+FOREACH(_flag CXX_FLAGS CXX_FLAGS_RELEASE CXX_FLAGS_DEBUG)
   IF(NOT "${CMAKE_${_flag}}" STREQUAL "")
-    UNSET(${CMAKE_${_flag}} CACHE)
-    MESSAGE(FATAL_ERROR
-      "\nThe deal.II cmake build system does not use CMAKE_${_flag}.\n"
-      "Use DEAL_II_${_flag}, instead!\n\n"
+    MESSAGE(STATUS
+      "Prepending \${CMAKE_${_flag}} to \${DEAL_II_${_flag}}"
       )
+    SET(DEAL_II_${_flag} "${CMAKE_${_flag}} ${DEAL_II_${_flag}}")
   ENDIF()
 ENDFOREACH()
 
+FOREACH(_flag LINKER_FLAGS LINKER_FLAGS_DEBUG LINKER_FLAGS_RELEASE)
+  IF(NOT "${CMAKE_SHARED_${_flag}}" STREQUAL "")
+    MESSAGE(STATUS
+      "Prepending \${CMAKE_SHARED_${_flag}} to \${DEAL_II_${_flag}}"
+      )
+    SET(DEAL_II_${_flag} "${CMAKE_${_flag}} ${DEAL_II_${_flag}}")
+  ENDIF()
+ENDFOREACH()
 
 #
-# Hide all unused compiler flag variables:
+# Hide all unused CMake variables:
 #
-FOREACH(_flag
+
+SET(DEAL_II_REMOVED_FLAGS
+  CMAKE_CXX_FLAGS
   CMAKE_CXX_FLAGS_RELEASE
   CMAKE_CXX_FLAGS_DEBUG
   CMAKE_CXX_FLAGS_MINSIZEREL
   CMAKE_CXX_FLAGS_RELWITHDEBINFO
+  CMAKE_C_FLAGS
   CMAKE_C_FLAGS_RELEASE
   CMAKE_C_FLAGS_DEBUG
   CMAKE_C_FLAGS_MINSIZEREL
   CMAKE_C_FLAGS_RELWITHDEBINFO
+  CMAKE_Fortran_FLAGS
   CMAKE_Fortran_FLAGS_RELEASE
   CMAKE_Fortran_FLAGS_DEBUG
   CMAKE_Fortran_FLAGS_MINSIZEREL
@@ -241,44 +239,60 @@ FOREACH(_flag
   CMAKE_SHARED_LINKER_FLAGS_RELEASE
   CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
   )
+FOREACH(_flag ${DEAL_II_REMOVED_FLAGS})
   # Go away...
-  SET(${_flag} "" CACHE INTERNAL "" FORCE)
+  SET(${_flag} ${${_flag}} CACHE INTERNAL "" FORCE)
+  # Also set it to an empty string for the configuration run so that it
+  # does not confuse the build system (to unset is not an option - it is
+  # cached...)
+  SET(${_flag} "")
 ENDFOREACH()
 
-
 #
-# Set cached compiler flags to an empty string:
+# Promote our configuration variables to cache:
 #
+
 SET(DEAL_II_USED_FLAGS
-  CMAKE_CXX_FLAGS
+  DEAL_II_CXX_FLAGS
   DEAL_II_CXX_FLAGS_DEBUG
   DEAL_II_CXX_FLAGS_RELEASE
   DEAL_II_LINKER_FLAGS
   DEAL_II_LINKER_FLAGS_DEBUG
   DEAL_II_LINKER_FLAGS_RELEASE
   )
-
 FOREACH(_flag ${DEAL_II_USED_FLAGS})
   #
   # Promote to cache:
   #
   SET(${_flag} "${${_flag}}" CACHE STRING
-   "The user supplied cache variable will be appended _at the end_ of the auto generated ${_flag} variable"
-   )
+    "The user supplied cache variable will be appended _at the end_ of the configuration step to the auto generated ${_flag} variable"
+    )
+  MARK_AS_ADVANCED(${_flag})
 
   #
-  # Save the initial (cached) variable at this point and clear it.
-  # ${flags}_SAVED will be appended to ${flags} in
-  # setup_finalize.cmake (called at the end of the
-  # main CMakeLists.txt file).
+  # The order of compiler and linker flags is important. In order to
+  # provide an override mechanism we have to save the initial (cached)
+  # variable at this point and clear it.
+  # ${flags}_SAVED will be appended to ${flags} again in
+  # setup_finalize.cmake (called at the end of the main CMakeLists.txt
+  # file).
   #
-  SET(${_flag}_SAVED "${${_flag}}")
-  SET(${_flag} "")
+  SET(${_flag}_SAVED ${${_flag}})
+  SET(${_flag})
+ENDFOREACH()
 
+FOREACH(_variable
+  DEAL_II_DEFINITIONS
+  DEAL_II_DEFINITIONS_DEBUG
+  DEAL_II_DEFINITIONS_RELEASE
+  )
   #
-  # Mark these flags as advanced.
+  # Promote to cache:
   #
-  MARK_AS_ADVANCED(${_flag})
+  SET(${_variable} ${${_variable}} CACHE STRING
+    "Additional, user supplied compile definitions"
+    )
+  MARK_AS_ADVANCED(${_variable})
 ENDFOREACH()
 
 
@@ -286,22 +300,28 @@ ENDFOREACH()
 # Finally, read in CXXFLAGS and LDFLAGS from environment and prepend them
 # to the saved variables:
 #
+
 SET(CMAKE_CXX_FLAGS_SAVED "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_SAVED}")
 SET(DEAL_II_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${DEAL_II_LINKER_FLAGS_SAVED}")
 UNSET(ENV{CXXFLAGS})
 UNSET(ENV{LDFLAGS})
 
+
+
+########################################################################
+#                                                                      #
+#                             Components:                              #
+#                                                                      #
+########################################################################
+
 #
-# Also respect DEAL_II_CXX_FLAGS - it just too easy to accientally write
-# DEAL_II_CXX_FLAGS instead of CMAKE_CXX_FLAGS... (this was a poor design
-# choice, I know...)
+# Configuration option for the 64 bit indices component:
 #
-IF(NOT "${DEAL_II_CXX_FLAGS}" STREQUAL "")
-  MESSAGE(STATUS
-    "Appending \${DEAL_II_CXX_FLAGS} to saved \${CMAKE_CXX_FLAGS}"
-    )
-  SET(CMAKE_CXX_FLAGS_SAVED "${CMAKE_CXX_FLAGS_SAVED} ${DEAL_II_CXX_FLAGS}")
-ENDIF()
+
+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
+  )
 
 
 
@@ -328,6 +348,9 @@ if this is what you tried to do.)
     )
 ENDIF()
 
+#
+# Miscellaneous renaming:
+#
 
 GET_CMAKE_PROPERTY(_res VARIABLES)
 FOREACH(_var ${_res})
index 879926d1b212288543e2a82866759a0b2eb36407..1caeff34e9e6982062118066d364165a569b4ebd 100644 (file)
@@ -27,7 +27,7 @@
 # All configuration in setup_compiler_flags.cmake and
 # setup_compiler_flags_<compiler>.cmake shall ONLY modify:
 #
-#   CMAKE_CXX_FLAGS
+#   DEAL_II_CXX_FLAGS
 #   DEAL_II_CXX_FLAGS_DEBUG
 #   DEAL_II_CXX_FLAGS_RELEASE
 #   DEAL_II_LINKER_FLAGS
@@ -37,7 +37,7 @@
 # All modifications shall be guarded with the ENABLE_IF_SUPPORTED
 # or ENABLE_IF_LINKS macro, e.g.
 #
-#   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
+#   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-fpic")
 #   ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
 #
 # Checks for compiler features (such as C++11 support) and compiler
 # Check the user provided CXX flags:
 #
 
-MESSAGE(STATUS "")
-IF(NOT "${CMAKE_CXX_FLAGS_SAVED}" STREQUAL "${CACHED_CMAKE_CXX_FLAGS_SAVED}")
+IF(NOT "${DEAL_II_CXX_FLAGS_SAVED}" STREQUAL "${CACHED_DEAL_II_CXX_FLAGS_SAVED}")
+  MESSAGE(STATUS "")
   # Rerun this test if cxx flags changed:
   UNSET(DEAL_II_HAVE_USABLE_CXX_FLAGS CACHE)
 ENDIF()
-SET(CACHED_CMAKE_CXX_FLAGS_SAVED "${CMAKE_CXX_FLAGS_SAVED}" CACHE INTERNAL "" FORCE)
+SET(CACHED_DEAL_II_CXX_FLAGS_SAVED "${DEAL_II_CXX_FLAGS_SAVED}" CACHE INTERNAL "" FORCE)
 
 # Initialize all CMAKE_REQUIRED_* variables a this point:
 RESET_CMAKE_REQUIRED()
@@ -84,8 +84,8 @@ IF(NOT DEAL_II_HAVE_USABLE_CXX_FLAGS)
   UNSET(DEAL_II_HAVE_USABLE_CXX_FLAGS CACHE)
   MESSAGE(FATAL_ERROR "\n"
     "Configuration error: Cannot compile with the user supplied CXX flags:\n"
-    "${CMAKE_CXX_FLAGS_SAVED}\n"
-    "Please check the CMake variable CMAKE_CXX_FLAGS and the\n"
+    "${DEAL_II_CXX_FLAGS_SAVED}\n"
+    "Please check the CMake variable DEAL_II_CXX_FLAGS and the\n"
     "environment variable CXXFLAGS\n\n"
     )
 ENDIF()
index 177473121ce227482d10cc305ef76b9ec15f0c7c..e0607ae195e55267d5342df267a40330f23eae12 100644 (file)
@@ -41,13 +41,13 @@ ENDIF()
 #
 IF(NOT (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
         CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.4"))
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-pedantic")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-pedantic")
 ENDIF()
 
 #
 # Set the pic flag.
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-fpic")
 
 #
 # Check whether the -as-needed flag is available. If so set it to link
@@ -58,12 +58,12 @@ ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
 #
 # Setup various warnings:
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wall")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wpointer-arith")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wwrite-strings")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wsynth")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wsign-compare")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wswitch")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wall")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wpointer-arith")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wwrite-strings")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wsynth")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wsign-compare")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wswitch")
 
 #
 # Newer versions of gcc have a flag -Wunused-local-typedefs that, though in
@@ -71,26 +71,26 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wswitch")
 # Unfortunately, this warning is included in -W/-Wall, so disable it if the
 # compiler supports it.
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-local-typedefs")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-local-typedefs")
 
 #
 # Disable Wlong-long that will trigger a lot of warnings when compiling
 # with disabled C++11 support:
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-long")
 
 #
 # Disable deprecation warnings
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-deprecated")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-deprecated")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-deprecated-declarations")
 
 
 IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   #
   # Silence Clang warnings about unused parameters:
   #
-  SET(CMAKE_CXX_FLAGS "-Qunused-arguments ${CMAKE_CXX_FLAGS}")
+  SET(DEAL_II_CXX_FLAGS "-Qunused-arguments ${DEAL_II_CXX_FLAGS}")
 
   #
   # *Boy*, clang seems to be the very definition of "pedantic" in
@@ -98,13 +98,13 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   # (that are mainly triggered in third party headers so that we cannot
   # easily fix them...)
   #
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-dangling-else")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-delete-non-virtual-dtor") # not harmless but needed for boost <1.50.0
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-newline-eof")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-function")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-private-field")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-variable")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-dangling-else")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-delete-non-virtual-dtor") # not harmless but needed for boost <1.50.0
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-long")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-newline-eof")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-function")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-private-field")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-variable")
 ENDIF()
 
 
index d29abc6537e85819ca06a15691bf9b1a5c705c28..d3357cb8c5ea1203f954d7c5cae5003a9fd8a35f 100644 (file)
@@ -38,7 +38,7 @@ ENDIF()
 #
 # Set the pic flag.
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-fpic")
 
 #
 # Check whether the -as-needed flag is available. If so set it to link
@@ -49,12 +49,12 @@ ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
 #
 # Set ansi mode:
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-ansi")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-ansi")
 
 #
 # Enable verbose warnings:
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-w2")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-w2")
 
 #
 # Disable some warnings that lead to a lot of false positives:
@@ -85,18 +85,18 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-w2")
 #   -w1572 floating-point equality and inequality comparisons are unreliable
 #   -w2536 type qualifiers are meaningless here
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd68")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd135")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd175")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd177")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd279")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd327")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd383")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd981")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd1418")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd1478")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd1572")
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd2536")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd68")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd135")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd175")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd177")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd279")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd327")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd383")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd981")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd1418")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd1478")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd1572")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-wd2536")
 
 
 IF(DEAL_II_STATIC_EXECUTABLE)
index 6aeaceb16d6c566f7c135d76bb18af5a689bfbf4..7529844b4bd13671adccdd337b30b2526024fcb5 100644 (file)
 ########################
 
 # enable exception handling:
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "/EHsc")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/EHsc")
 
 #enable warnings:
-ADD_FLAGS(CMAKE_CXX_FLAGS "/W3")
+ADD_FLAGS(DEAL_II_CXX_FLAGS "/W3")
 
 # Globally disable some legacy min and max macros that cause problems:
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "/NOMINMAX")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/NOMINMAX")
 
 #############################
 #                           #
index 45ed9f36a5872d6d1bb76bfc464b7a42a72f51c7..3221dca03db33530a9e211efa176b1bc0e3dd59f 100644 (file)
@@ -36,6 +36,21 @@ FOREACH(_flags ${DEAL_II_USED_FLAGS})
   STRING(STRIP "${${_flags}} ${${_flags}_SAVED}" ${_flags})
 ENDFOREACH()
 
+#
+# Sanity check: The variables defined in DEAL_II_REMOVED_FLAGS must not be
+# used during the comfiguration stage:
+#
+FOREACH(_flag ${DEAL_II_REMOVED_FLAGS})
+  IF(NOT "${_flag}" STREQUAL "")
+    MESSAGE(FATAL_ERROR
+      "\nInternal configuration error: The variable ${_flag} was set to a "
+      "non empty value during the configuration! (The corresponding "
+      "DEAL_II_* variable should have been used.)\n"
+      "${_flag}=\"${${_flag}}\"\n"
+      )
+  ENDIF()
+ENDFOREACH()
+
 #
 # Deduplicate entries in DEAL_II_USER_INCLUDE_DIRS
 #
@@ -149,7 +164,7 @@ _both("#\n")
 
 _detailed(
 "#  Compiler flags used for this build:
-#        CMAKE_CXX_FLAGS:              ${CMAKE_CXX_FLAGS}
+#        DEAL_II_CXX_FLAGS:            ${DEAL_II_CXX_FLAGS}
 "
   )
 IF(CMAKE_BUILD_TYPE MATCHES "Release")
@@ -158,6 +173,7 @@ ENDIF()
 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
   _detailed("#        DEAL_II_CXX_FLAGS_DEBUG:      ${DEAL_II_CXX_FLAGS_DEBUG}\n")
 ENDIF()
+
 _detailed("#        DEAL_II_LINKER_FLAGS:         ${DEAL_II_LINKER_FLAGS}\n")
 IF(CMAKE_BUILD_TYPE MATCHES "Release")
   _detailed("#        DEAL_II_LINKER_FLAGS_RELEASE: ${DEAL_II_LINKER_FLAGS_RELEASE}\n")
@@ -165,6 +181,15 @@ ENDIF()
 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
   _detailed("#        DEAL_II_LINKER_FLAGS_DEBUG:   ${DEAL_II_LINKER_FLAGS_DEBUG}\n")
 ENDIF()
+
+_detailed("#        DEAL_II_DEFINITIONS:          ${DEAL_II_DEFINITIONS}\n")
+IF(CMAKE_BUILD_TYPE MATCHES "Release")
+  _detailed("#        DEAL_II_DEFINITIONS_RELEASE:  ${DEAL_II_DEFINITIONS_RELEASE}\n")
+ENDIF()
+IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+  _detailed("#        DEAL_II_DEFINITIONS_DEBUG:    ${DEAL_II_DEFINITIONS_DEBUG}\n")
+ENDIF()
+
 _detailed("#\n")
 
 IF(NOT DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
index e500d2c9acf285acaa90a61d05dd065261b19b3a..aea4a22765dd26edfe4522162a64f94ab1474ec9 100644 (file)
@@ -170,7 +170,7 @@ SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
 # All configuration in setup_compiler_flags.cmake and
 # setup_compiler_flags_<compiler>.cmake shall ONLY modify:
 #
-#   CMAKE_CXX_FLAGS
+#   DEAL_II_CXX_FLAGS
 #   DEAL_II_CXX_FLAGS_DEBUG
 #   DEAL_II_CXX_FLAGS_RELEASE
 #   DEAL_II_LINKER_FLAGS
@@ -180,7 +180,7 @@ SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
 # All modifications shall be guarded with the ENABLE_IF_SUPPORTED
 # or ENABLE_IF_LINKS macro, e.g.
 #
-#   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
+#   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-fpic")
 #   ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
 #
 # Compiler flags for platform dependent optimization (such as
@@ -188,7 +188,7 @@ SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
 # DEAL_II_ALLOW_PLATFORM_INTROSPECTION:
 #
 #   IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
-#     ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-march=native")
+#     ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-march=native")
 #   ENDIF()
 #
 # Checks for compiler features (such as C++11 support) and compiler
@@ -514,7 +514,7 @@ DEAL_II_FORCE_BUNDLED_&lt;FEATURE&gt;        (an option)
       For internal use, for setting necessary compiler flags, e.g.
       <code>-std=c++11</code> (if available):
       <ul>
-        <li> <code>CMAKE_CXX_FLAGS</code>
+        <li> <code>DEAL_II_CXX_FLAGS</code>
         <li> <code>DEAL_II_CXX_FLAGS_DEBUG</code>
         <li> <code>DEAL_II_CXX_FLAGS_RELEASE</code>
       </ul>
index 27fbdd8bb99961ae8938c7d2fc252dc113118fd2..1c51a8872bb59ce9a330de660603fc5d9de21807 100644 (file)
@@ -41,7 +41,7 @@
           <code>-DDEAL_II_SETUP_DEFAULT_COMPILER_FLAGS=OFF</code> and set all
           necessary compiler flags by hand via
 <pre>
-CMAKE_CXX_FLAGS           - used during all builds
+DEAL_II_CXX_FLAGS         - used during all builds
 DEAL_II_CXX_FLAGS_DEBUG   - additional flags for the debug library
 DEAL_II_CXX_FLAGS_RELEASE - additional flags for the release library
 </pre>
index 26faa6c15b3d394ef4058ec45dfbd505e97d6728..075bfe22eb31464c4a5819f05c4bfead813d431e 100644 (file)
@@ -91,7 +91,7 @@
 #   "Fortran Compiler."
 #   )
 #
-# SET(CMAKE_CXX_FLAGS "" CACHE STRING
+# SET(DEAL_II_CXX_FLAGS "" CACHE STRING
 #   "The user supplied cache variable will be appended _at the end_ of the auto generated CMAKE_CXX_FLAGS variable"
 #   )
 #
 #   "The user supplied cache variable will be appended _at the end_ of the auto generated DEAL_II_LINKER_FLAGS_RELEASE variable"
 #   )
 #
+# SET(DEAL_II_DEFINITIONS "" CACHE STRING
+#   "Additional, user supplied compile definitions"
+#   )
+#
+# SET(DEAL_II_DEFINITIONS_DEBUG "" CACHE STRING
+#   "Additional, user supplied compile definitions"
+#   )
+#
+# SET(DEAL_II_DEFINITIONS_RELEASE "" CACHE STRING
+#   "Additional, user supplied compile definitions"
+#   )
+#
 # SET(BUILD_SHARED_LIBS "ON" CACHE BOOL
 #   "Build a shared library"
 #   )
index 1f2d695a10e897b48399d8c0c2b84caefa5a7fdf..f702d4524249cf58ed4a326293fce300f62ed23e 100644 (file)
@@ -861,7 +861,7 @@ cmake -DCMAKE_C_COMPILER="mpicc" -DCMAKE_CXX_COMPILER="mpicxx" -DCMAKE_Fortran_C
          Override the default configuration by setting the following
          cached variables:
 <pre class="cmake">
-CMAKE_CXX_FLAGS           - used during all builds
+DEAL_II_CXX_FLAGS         - used during all builds
 DEAL_II_CXX_FLAGS_DEBUG   - additional flags for the debug library
 DEAL_II_CXX_FLAGS_RELEASE - additional flags for the release library
 </pre>
@@ -872,7 +872,7 @@ DEAL_II_CXX_FLAGS_RELEASE - additional flags for the release library
          <code>-Wsign-compare</code>, set by the build system, can be
          overwritten by specifying:
 <pre class="cmake">
-cmake -DCMAKE_CXX_FLAGS="-Wno-sign-compare" &lt;...&gt;
+cmake -DDEAL_II_CXX_FLAGS="-Wno-sign-compare" &lt;...&gt;
 </pre>
 
         <li>
index b1f13d8d7ad98c0210c67283640ae9c99a820703..19e8aa3201495e4af2b51fea64571da9d4e2b0c3 100644 (file)
@@ -483,9 +483,9 @@ installation.
 <p>
 Furthermore, this macro sets the C++ compiler and the compile flags to
 default values (the same values that were used to compile deal.II itself).
-These are <code>CMAKE_CXX_COMPILER</code> and <code>CMAKE_CXX_FLAGS</code>,
+These are <code>CMAKE_CXX_COMPILER</code> and <code>DEAL_II_CXX_FLAGS</code>,
 as well as - depending on the configuration -
-<code>DEAL_II_FLAGS_DEBUG</code>, or <code>DEAL_II_FLAGS_RELEASE</code>, or
+<code>DEAL_II_CXX_FLAGS_DEBUG</code>, or <code>DEAL_II_CXX_FLAGS_RELEASE</code>, or
 both.
 </p>
 

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.