/usr/share/deal.ii/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake is in libdeal.ii-dev 8.1.0-6ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | ## ---------------------------------------------------------------------
## $Id: macro_deal_ii_initialize_cached_variables.cmake 31527 2013-11-03 09:58:45Z maier $
##
## Copyright (C) 2012 - 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.
##
## ---------------------------------------------------------------------
#
# This file implements the DEAL_II_INITIALIZE_VARIABLES macro, which is
# part of the deal.II library.
#
# Usage:
# DEAL_II_INITIALIZE_CACHED_VARIABLES()
#
# This sets some cached variables to the values used for compiling the
# deal.II library.
#
# This macro has to be called before PROJECT()!
#
MACRO(DEAL_II_INITIALIZE_CACHED_VARIABLES)
IF(NOT DEAL_II_PROJECT_CONFIG_INCLUDED)
MESSAGE(FATAL_ERROR
"\nDEAL_II_INITIALIZE_CACHED_VARIABLES can only be called in external "
"projects after the inclusion of deal.IIConfig.cmake. It is not "
"intended for internal use.\n\n"
)
ENDIF()
#
# Set build type according to available libraries
#
IF(DEAL_II_BUILD_TYPE MATCHES "Debug")
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING
"Choose the type of build, options are: Debug, Release"
)
ELSE()
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: Debug, Release"
)
ENDIF()
#
# Reset build type if unsupported, i.e. if it is not (case insensitively
# equal to Debug or Release or unsupported by the current build type:
#
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" _cmake_build_type)
STRING(TOLOWER "${DEAL_II_BUILD_TYPE}" _deal_ii_build_type)
IF( NOT "${_cmake_build_type}" MATCHES "^(debug|release)$"
OR NOT _deal_ii_build_type MATCHES "${_cmake_build_type}" )
IF("${DEAL_II_BUILD_TYPE}" STREQUAL "DebugRelease")
SET(_new_build_type "Debug")
ELSE()
SET(_new_build_type "${DEAL_II_BUILD_TYPE}")
ENDIF()
MESSAGE(
"###
#
# WARNING:
#
# CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" unsupported by current installation!
# deal.II was built with CMAKE_BUILD_TYPE \"${DEAL_II_BUILD_TYPE}\".
#
# CMAKE_BUILD_TYPE is forced to \"${_new_build_type}\".
#
###"
)
SET(CMAKE_BUILD_TYPE "${_new_build_type}" CACHE STRING
"Choose the type of build, options are: Debug, Release"
FORCE
)
ENDIF()
SET(CMAKE_CXX_COMPILER ${DEAL_II_CXX_COMPILER} CACHE STRING
"CXX Compiler.")
SET(CMAKE_CXX_FLAGS ${DEAL_II_CXX_FLAGS} CACHE STRING
"Flags used by the compiler during all build types."
)
SET(CMAKE_CXX_FLAGS_DEBUG ${DEAL_II_CXX_FLAGS_DEBUG} CACHE STRING
"Flags used by the compiler during debug builds."
)
SET(CMAKE_CXX_FLAGS_RELEASE ${DEAL_II_CXX_FLAGS_RELEASE} CACHE STRING
"Flags used by the compiler during release builds."
)
MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
ENDMACRO()
|