ENABLE_LANGUAGE_OPTIONAL(C)
ENABLE_LANGUAGE_OPTIONAL(Fortran)
-INCLUDE(setup_post_project_call)
-
INCLUDE(setup_deal_ii)
+
INCLUDE(setup_compiler_flags)
#
ADD_SUBDIRECTORY(contrib) # has to be included after source
ADD_SUBDIRECTORY(examples)
-ADD_SUBDIRECTORY(tests ${CMAKE_BINARY_DIR}/quick_tests)
+ADD_SUBDIRECTORY(tests ${CMAKE_BINARY_DIR}/tests/quick_tests)
IF(DEAL_II_HAVE_TESTS_DIRECTORY)
ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests)
IF(DEAL_II_COMPONENT_COMPAT_FILES)
SET_TARGET_PROPERTIES(expand_instantiations
- PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts
+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts
)
INSTALL(TARGETS expand_instantiations
EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
ENDIF()
EXPORT(TARGETS expand_instantiations
- FILE ${CMAKE_BINARY_DIR}/importExecutables.cmake
+ FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake
)
ENDIF()
ENDIF()
SET_TARGET_PROPERTIES(make_dependencies report_features
- PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts
+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts
)
INSTALL(TARGETS make_dependencies report_features
#
# Add convenience targets that build and install only a specific component:
#
+# library
+# compat_files
+# documentation
+# examples
+# mesh_converter
+# parameter_gui
+#
# The library can always be installed ;-)
ADD_CUSTOM_TARGET(library
# Set up deal.II specific definitions
#
# This file defines a long list of uncached variables, used throughout the
-# configuration to determine paths, locations and names.
+# configuration to determine paths, locations and names. Some linkage and
+# crosscompilation setup happens also in here.
#
# Definitions marked with *) can be overriden by defining them to cache
# prior to the call of this file. This is done with the help of the
SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}")
ENDIF()
-
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
LIST(APPEND DEAL_II_BUILD_TYPES "DEBUG")
ENDIF()
LIST(APPEND DEAL_II_BUILD_TYPES "RELEASE")
ENDIF()
+
+########################################################################
+# #
+# Setup static linkage and crosscompilation: #
+# #
+########################################################################
+
+#
+# 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:
+ 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"
+ )
+ IF(DEAL_II_NATIVE MATCHES "-NOTFOUND")
+ MESSAGE(FATAL_ERROR
+ "Please set the CMake variable DEAL_II_NATIVE to a valid path that points to a native deal.II build directory"
+ )
+ ENDIF()
+ INCLUDE(${DEAL_II_NATIVE}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake)
+ENDIF()
+++ /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"
- )
- IF(DEAL_II_NATIVE MATCHES "-NOTFOUND")
- MESSAGE(FATAL_ERROR
- "Please set the CMake variable DEAL_II_NATIVE to a valid path that points to a native deal.II build directory"
- )
- ENDIF()
- INCLUDE(${DEAL_II_NATIVE}/importExecutables.cmake)
-ENDIF()
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}"
COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}"
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}"
- ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
- LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
+ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
)
TARGET_LINK_LIBRARIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}