[Dune] How to cross compile Dune via cmake?

Christian Engwer christian.engwer at uni-muenster.de
Wed Mar 29 22:58:24 CEST 2017


Dear cmake gurus,

in previous times there was a brief overview written by Markus on how
to compile Dune in a cross-commpile environment (at that time with a
focus on the blue-gene).

Today I again tried to cross compile Dune.

I failed horribly... I followed some instructions on the kitware page
and started adding more cmake flags for specific Dune features. I
quickly ran into a problem I was not able to solve... the threads
test:

--- calling configure for dune-common ---
 cmake   -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc-win32 -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++-win32 -DCMAKE_Fortran_COMPILER=i686-w64-mingw32-gfortran-win32 -DCMAKE_RC_COMPILER=i686-w64-mingw32-windres -DSTDTHREAD_WORKS=no "/tmp/common"
CMake Warning at cmake/modules/CheckCXXFeatures.cmake:362 (message):
  Crosscompiling, cannot run test program to see whether std::thread works.
  Assuming that the found configuration does indeed work.
Call Stack (most recent call first):
  cmake/modules/DuneMacros.cmake:686 (include)
  CMakeLists.txt:17 (dune_project)


CMake Error at cmake/modules/CheckCXXFeatures.cmake:403 (message):
  Your system does not seem to have a working implementation of std::thread.
  If it does, please set the linker flags required to get std::thread working
  in the cache variable STDTHREAD_LINK_FLAGS.  If you think this test is
  wrong, set the cache variable STDTHREAD_WORKS.
Call Stack (most recent call first):
  cmake/modules/DuneMacros.cmake:686 (include)
  CMakeLists.txt:17 (dune_project)


-- Configuring incomplete, errors occurred!


Any help is highly appreciated...

Ciao
Christian




More information about the Dune mailing list