#
# deal.IIConfig.cmake
# deal.IIVersionConfig.cmake
+# Make.global_options
#
# We support two configurations out of which deal.II can be used - directly
# from the build directory or after installation. So we have to prepare
${DEAL_II_LIBRARIES_${_build}}
${DEAL_II_LIBRARIES}
)
+ TO_STRING(MAKEFILE_LIBRARIES_${_build} ${CONFIG_LIBRARIES_${_build}})
+ TO_STRING(MAKEFILE_USER_DEFINITIONS_${_build} ${DEAL_II_USER_DEFINITIONS_${_build}})
LIST(APPEND CONFIG_LIBRARIES ${_keyword} \${DEAL_II_LIBRARIES_${_build}})
SET(CONFIG_TARGET_${_build} ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX})
LIST(APPEND CONFIG_TARGET ${_keyword} \${DEAL_II_TARGET_${_build}})
ENDFOREACH()
+TO_STRING(MAKEFILE_BUILD_TYPES ${DEAL_II_BUILD_TYPES})
+TO_STRING(MAKEFILE_USER_DEFINITIONS ${DEAL_II_USER_DEFINITIONS})
+
+IF(DEAL_II_STATIC_EXECUTABLE)
+ SET(MAKEFILE_STATIC_EXECUTABLE "true")
+ELSE()
+ SET(MAKEFILE_STATIC_EXECUTABLE "false")
+ENDIF()
+
#
# For binary dir:
#
SET(CONFIG_BUILD_DIR TRUE)
+SET(MAKEFILE_BUILD_DIR "true")
SET(CONFIG_INCLUDE_DIRS
\${DEAL_II_PATH}/include
${CMAKE_SOURCE_DIR}/include/
${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
@ONLY
)
+TO_STRING(MAKEFILE_INCLUDE_DIRS ${CONFIG_INCLUDE_DIRS})
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
+ ${CMAKE_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/Make.global_options
+ @ONLY
+ )
#
# For installation:
#
SET(CONFIG_BUILD_DIR FALSE)
+SET(MAKEFILE_BUILD_DIR "false")
SET(CONFIG_INCLUDE_DIRS
\${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}
\${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled
${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
@ONLY
)
+TO_STRING(MAKEFILE_INCLUDE_DIRS ${CONFIG_INCLUDE_DIRS})
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+ @ONLY
+ )
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
COMPONENT library
)
+INSTALL(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+ DESTINATION ${DEAL_II_SHARE_RELDIR}
+ COMPONENT library
+ )
#
-# Append feature configuration to both configuration files:
+# Append feature configuration to all configuration files:
#
SET(_files
${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
)
-FOREACH(_file ${_files})
- FILE(APPEND ${_file}
- "\n\n#\n# Feature configuration:\n#\n\n"
- )
+SET(_makefiles
+ ${CMAKE_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/Make.global_options
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/Make.global_options
+ )
+FOREACH(_file ${_files} ${_makefiles})
+ FILE(APPEND ${_file} "\n\n#\n# Feature configuration:\n#\n\n")
ENDFOREACH()
+
GET_CMAKE_PROPERTY(res VARIABLES)
FOREACH(var ${res})
IF(var MATCHES "DEAL_II_WITH")
FOREACH(_file ${_files})
- FILE(APPEND ${_file}
- "SET(${var} ${${var}})\n"
- )
+ FILE(APPEND ${_file} "SET(${var} ${${var}})\n")
+ ENDFOREACH()
+ FOREACH(_file ${_makefiles})
+ IF(${var})
+ FILE(APPEND ${_file} "${var} = true\n")
+ ELSE()
+ FILE(APPEND ${_file} "${var} = false\n")
+ ENDIF()
ENDFOREACH()
ENDIF()
ENDFOREACH()
DEAL_II_PROJECT_CONFIG_NAME = @DEAL_II_PROJECT_CONFIG_NAME@
DEAL_II_BUILD_TYPE = @CMAKE_BUILD_TYPE@
-DEAL_II_BUILD_TYPES = @DEAL_II_BUILD_TYPES@
+DEAL_II_BUILD_TYPES = @MAKEFILE_BUILD_TYPES@
#
# Information about the project location
DEAL_II_PROJECT_CONFIG_RELDIR = @DEAL_II_PROJECT_CONFIG_RELDIR@
#
-# Determine DEAL_II_PATH from CMAKE_CURRENT_LIST_DIR:
+# Determine DEAL_II_PATH from MAKEFILE_LIST:
#
-
-mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
-
-DEAL_II_PATH :=
+DEAL_II_MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+DEAL_II_PATH := $(subst /${DEAL_II_SHARE_RELDIR}/Make.global_options,,${DEAL_II_MAKEFILE_PATH})
#
# Information about configuration:
#
DEAL_II_PROJECT_CONFIG_INCLUDED = true
-DEAL_II_BUILD_DIR = @CONFIG_BUILD_DIR@
+DEAL_II_BUILD_DIR = @MAKEFILE_BUILD_DIR@
#
DEAL_II_LINKER_FLAGS_RELEASE = @DEAL_II_LINKER_FLAGS_RELEASE@
# used for all targets:
-DEAL_II_USER_DEFINITIONS = @DEAL_II_USER_DEFINITIONS@
+DEAL_II_USER_DEFINITIONS = @MAKEFILE_USER_DEFINITIONS@
# _additionally_ used for debug targets:
-DEAL_II_USER_DEFINITIONS_DEBUG = @DEAL_II_USER_DEFINITIONS_DEBUG@
+DEAL_II_USER_DEFINITIONS_DEBUG = @MAKEFILE_USER_DEFINITIONS_DEBUG@
# _additionally_ used for release targets:
-DEAL_II_USER_DEFINITIONS_RELEASE = @DEAL_II_USER_DEFINITIONS_RELEASE@
+DEAL_II_USER_DEFINITIONS_RELEASE = @MAKEFILE_USER_DEFINITIONS_RELEASE@
#
# Build a static executable:
#
-DEAL_II_STATIC_EXECUTABLE = @DEAL_II_STATIC_EXECUTABLE@
+DEAL_II_STATIC_EXECUTABLE = @MAKEFILE_STATIC_EXECUTABLE@
#
#
# Full list of include directories:
-DEAL_II_INCLUDE_DIRS = @CONFIG_INCLUDE_DIRS@
+DEAL_II_INCLUDE_DIRS = ${DEAL_II_PATH}@MAKEFILE_INCLUDE_DIRS@
# Full list of libraries for the debug target:
-DEAL_II_LIBRARIES_DEBUG = @CONFIG_LIBRARIES_DEBUG@
+DEAL_II_LIBRARIES_DEBUG = ${DEAL_II_PATH}@MAKEFILE_LIBRARIES_DEBUG@
# Full list of libraries for the release target:
-DEAL_II_LIBRARIES_RELEASE = @CONFIG_LIBRARIES_RELEASE@
+DEAL_II_LIBRARIES_RELEASE = ${DEAL_II_PATH}@MAKEFILE_LIBRARIES_RELEASE@
+++ /dev/null
-## ---------------------------------------------------------------------
-##
-## Copyright (C) 2012 - 2014 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.
-##
-## ---------------------------------------------------------------------
-
-#
-# If bool is "true" (in a cmake fashion...), set variable to "yes",
-# otherwise to "no".
-#
-# Usage:
-# COND_SET_TO_YES(bool variable)
-#
-
-MACRO(COND_SET_TO_YES _bool _variable)
- IF(${_bool})
- SET(${_variable} "yes")
- ELSE()
- SET(${_variable} "no")
- ENDIF()
-ENDMACRO()
-