FOREACH (_inst_in_file ${_inst_in_files})
STRING(REGEX REPLACE "\\.in$" "" _inst_file "${_inst_in_file}" )
+ SET(_dependency)
+ IF(TARGET expand_instantiations)
+ SET(_dependency expand_instantiations)
+ ENDIF()
+
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}
- DEPENDS expand_instantiations
+ DEPENDS ${_dependency}
${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments
${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file}
COMMAND expand_instantiations
COMPONENT compat_files
)
ENDIF()
-
- EXPORT(TARGETS expand_instantiations
- FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake
- )
ENDIF()
IF(DEAL_II_COMPONENT_COMPAT_FILES)
DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
COMPONENT compat_files
)
- EXPORT(TARGETS make_dependencies report_features
- FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake
- APPEND
- )
ENDIF()
# #
########################################################################
-#
-# 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()
You have to set up a native deal.II build directory first and run
<code>make expand_instantiations</code> in it. The executable is
needed for the build system (and obviously the cross compiled version
- cannot be used). Assuming you have a working cross compilation
- toolchain, set up a <i>toolchain file</i> next. An example toolchain
- file can be found <a href="Toolchain.sample">here</a>. With that
- invoke <code>cmake</code> e.g. with:
+ cannot be used). Locate the <code>expand_instantions</code>
+ executable and export its location in the <code>PATH</code>
+ environment variable.
+ </p>
+
+ <p>
+ Assuming you have a working cross compilation toolchain, set up a
+ <a href="Toolchain.sample"><i>toolchain file</i></a> next. With that
+ invoke <code>cmake</code> with something like:
<pre>
cmake -DCMAKE_TOOLCHAIN_FILE=<...>/Toolchain.sample
- -DDEAL_II_NATIVE=<...>/native/build/dir
-
-DDEAL_II_FORCE_BUNDLED_BOOST=ON
-DDEAL_II_ALLOW_AUTODETECTION=OFF
../deal.II
</pre>
- where <code>DEAL_II_NATIVE</code> points to the toolchain file and
- <code>DEAL_II_NATIVE</code> to the native build directory (which
- <code>expand_instantiations</code> will be picked from). The remaining
- configuration can be adjusted at will, see <a
- href="cmake.html">the documentation</a>.
+ where <code>CMAKE_TOOLCHAIN_FILE</code> points to the toolchain file.
+ The remaining configuration can be adjusted at will, see <a
+ href="cmake.html">the documentation</a>.
</p>
<hr />
</pre>
</p>
- <p>
- <b>Note:</b> Specifying these options via environment variables is
- volatile, i.e. if <code>make setup_tests</code> is invoked a second
- time without the variables set in environment, the option will be
- reset to the default value. If you want to set these options
- permanently, set them via cmake as CMake variable in the build
- directory:
+ Alternatively, you can also set them as CMake variables when
+ configuring the build directory:
<pre>
$ cmake -DTEST_PICKUP_REGEX="<regular expression>" .
</pre>
- A variable set via cmake always <i>overrides</i> one
- set via environment.
+ The variables will be passed down to the subprojects. A variable set
+ via cmake always <i>overrides</i> one set via environment.
+ </p>
+
+ <p>
+ <b>Note:</b> The subprojects cache these options (regardless of set
+ via environment variables or as cmake variable). So, if you want to
+ disable an option again, you have to explicitly set it to an empty
+ string. Furthermore, if you have set the option as a CMake variable
+ in the build directory configuration you have to overwrite it in the
+ build directory cache.
</p>
<a name="run"></a>