ENABLE_LANGUAGE_OPTIONAL(C)
ENABLE_LANGUAGE_OPTIONAL(Fortran)
+INCLUDE(setup_post_project_call)
+
INCLUDE(setup_deal_ii)
INCLUDE(setup_compiler_flags)
OPTION(DEAL_II_ALLOW_PLATFORM_INTROSPECTION
- "Allow platform introspection for CPU command set, SSE and AVX"
+ "Allow platform introspection for CPU command sets, SSE and AVX"
ON
)
MARK_AS_ADVANCED(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
)
-
#
# Tell the user very prominently, that we're doing things differently w.r.t
# CMAKE_(C|CXX)_FLAGS_(DEBUG|RELEASE)
SHARED_LINKER_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"
ENDIF()
ENDFOREACH()
+
#
# Hide all unused compiler flag variables:
#
SET(${_flag} "" CACHE INTERNAL "" FORCE)
ENDFOREACH()
+
#
# Set cached compiler flags to an empty string:
#
# DEAL_II_PROJECT_CONFIG_RELDIR *)
#
# DEAL_II_BUILD_TYPES
-# DEAL_II_WITH_BUNDLED_DIRECTORY
-# DEAL_II_WITH_DOC_DIRECTORY
#
# *) Can be overwritten by the command line via -D<...>
#
LIST(APPEND DEAL_II_BUILD_TYPES "RELEASE")
ENDIF()
-
-########################################################################
-# #
-# Cleanup and setup that has to happen after the call to PROJECT(): #
-# #
-########################################################################
-
-#
-# Cleanup some files used for storing the names of all object targets that
-# will be bundled to the deal.II library.
-# (Right now, i.e. cmake 2.8.8, this is the only reliable way to get
-# information into a global scope...)
-#
-FOREACH(_build ${DEAL_II_BUILD_TYPES})
- STRING(TOLOWER "${_build}" _build_lowercase)
- FILE(REMOVE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_${_build_lowercase}
- )
-ENDFOREACH()
-
-IF(DEAL_II_PREFER_STATIC_LIBS)
- #
- # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS
- # is set. This will prefer static archives instead of shared libraries:
- #
- # TODO: Does this work on a Windows or CYGWIN target?
- LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
-ENDIF()
-
-#
-# Cross compilation stuff:
-#
-IF(CMAKE_CROSSCOMPILING)
- #
- # Disable platform introspection when cross compiling
- #
- SET(DEAL_II_ALLOW_PLATFORM_INTROSPECTION OFF CACHE BOOL "" FORCE)
-
- #
- # Import native expand_instantiations for use in cross compilation:
- #
- SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH
- "A pointer to a native deal.Ii build directory"
- )
- INCLUDE(${DEAL_II_NATIVE}/cmake/scripts/importExecutables.cmake)
-ENDIF()
ENDIF()
ENDFOREACH()
+#
+# Cleanup some files used for storing the names of all object targets that
+# will be bundled to the deal.II library.
+# (Right now, i.e. cmake 2.8.8, this is the only reliable way to get
+# information into a global scope...)
+#
+FOREACH(_build ${DEAL_II_BUILD_TYPES})
+ STRING(TOLOWER "${_build}" _build_lowercase)
+ FILE(REMOVE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_${_build_lowercase}
+ )
+ENDFOREACH()
+
########################################################################
# #
--- /dev/null
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+
+########################################################################
+# #
+# Setup that has to happen after the call to PROJECT(): #
+# #
+########################################################################
+
+#
+# Library search order:
+#
+IF(DEAL_II_PREFER_STATIC_LIBS)
+ #
+ # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS
+ # is set. This will prefer static archives instead of shared libraries:
+ #
+ # TODO: Does this work on a Windows or CYGWIN target?
+ LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
+ENDIF()
+
+
+#
+# Cross compilation stuff:
+#
+IF(CMAKE_CROSSCOMPILING)
+ #
+ # Disable platform introspection when cross compiling
+ #
+ SET(DEAL_II_ALLOW_PLATFORM_INTROSPECTION OFF CACHE BOOL "" FORCE)
+
+ #
+ # Import native expand_instantiations for use in cross compilation:
+ #
+ SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH
+ "A pointer to a native deal.Ii build directory"
+ )
+ INCLUDE(${DEAL_II_NATIVE}/cmake/scripts/importExecutables.cmake)
+ENDIF()