deal.II uses very few POSIX specific system features and is otherwise fairly ISO (2011) C++ Standard compliant. Consequently, there is a good chance that deal.II will run on a reasonably well behaved system besides the ones listed in the ReadMe. Nevertheless, there are cases where some adjustments are necessary.
Currently, the deal.II CMake build system recognizes gcc, clang, as well as icc, and sets up reasonable default compiler flags.
-DDEAL_II_SETUP_DEFAULT_COMPILER_FLAGS=OFF
and set all
necessary compiler flags by hand via
DEAL_II_CXX_FLAGS - used during all builds DEAL_II_CXX_FLAGS_DEBUG - additional flags for the debug library DEAL_II_CXX_FLAGS_RELEASE - additional flags for the release libraryAfter that try to compile the library with minimal external dependencies (
-DDEAL_II_ALLOW_AUTODETECTION=OFF
, for
further information see the deal.II CMake
documentation).
cmake/setup_compiler_flags.cmake cmake/setup_compiler_flags_gnu.cmake cmake/setup_compiler_flags_icc.cmakePatches are highly welcome! See here for information on how to get in contact with us.
cmake/checks/check_01_for_compiler_features.cmake cmake/checks/check_01_for_cxx_features.cmake cmake/checks/check_03_for_compiler_bugs.cmake include/deal.II/base/config.h.into see how compiler specific checks are done.
deal.II should support almost all reasonably POSIX compliant platforms out of the box. Nevertheless, the following bits of information might help:
source/base/timer.cc
have implementations for POSIX
and Windows and will not work correctly on other platforms.
cmake/checks/check_01_cxx_features.cmake cmake/checks/check_02_compiler_features.cmake cmake/checks/check_02_system_features.cmake cmake/checks/check_03_compiler_bugs.cmake include/deal.II/base/config.h.into see how platform and compiler specific checks are done.
It is possible to use CMake to cross compile deal.II for a foreign platform. Further information on that topic can be found at the CMake wiki.
You have to set up a native deal.II build directory first and run
make expand_instantiations_exe
in it. The executable is
needed for the build system (and obviously the cross compiled version
cannot be used). Locate the expand_instantiations
executable (it usually resides under
${CMAKE_BINARY_DIR}/bin
and export its location with the
PATH
environment variable.
Assuming you have a working cross compilation toolchain, the next
step is to set up a
toolchain file
(or for for
Windows64 using MinGW).
After that invoke cmake
with something like:
$ cmake -DCMAKE_TOOLCHAIN_FILE=<...>/Toolchain.sample \ -DDEAL_II_FORCE_BUNDLED_BOOST=ON \ -DDEAL_II_ALLOW_AUTODETECTION=OFF \ ../deal.IIwhere
CMAKE_TOOLCHAIN_FILE
points to the toolchain file.
The remaining configuration can be adjusted at will, see the documentation.