[Dune] cmake docu ?

Markus Blatt markus at dr-blatt.de
Fri Nov 21 18:29:44 CET 2014


BTW there is a handy script that can assist when converting a module
from autotools to CMake, see dune-common/bin/am2cmake.py.

It will parse your Makefile.am files and create CMakeLists.txt from
it. You might want to clean them up manually afterwards.

Markus

On Fri, Nov 21, 2014 at 05:39:52PM +0100, Benedikt Oswald wrote:
> Dear Dune,
> 
> thanks for the support with the cmake based build system!
> 
> I have progressed in migrating to the cmake based build system,
> but I experience a linker problem that I dare present, cf. below.
> 
> in my CMakeList.txt file I say:
> 
> link_libraries(${DUNE_Boost_LIBRARIES})
> include_directories(${Boost_INCLUDE_DIR})
> add_definitions(-DENABLE_BOOST)
> 
> add_executable(vulcain vulcain.cc)
> target_link_libraries("vulcain")
> add_dune_mpi_flags(vulcain)
> 
> 
> Could you suggest if this is wrong/incomplete ?
> 
> Thanks & greetings,
> Benedikt
> 
> PS: I understand that Dune will swtich to cmake as the default build system
> over this weekend, in fact I find this very courageous...
> 
> 
> 
> =========================
> 
> Linking CXX executable vulcain
> Undefined symbols for architecture x86_64:
>   "Dune::dverb", referenced from:
>       Dune::MPIHelper::MPIHelper(int&, char**&) in vulcain.cc.o
>       Dune::MPIHelper::~MPIHelper() in vulcain.cc.o
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> 
> 
> 
> 
> 
> 
> 
> Am 21/11/14 um 16:11 schrieb Markus Blatt:
> > Hi,
> >
> > On Fri, Nov 21, 2014 at 03:31:01PM +0100, Benedikt Oswald wrote:
> >> I build on Mac OS X currently, where cmake quite persistently chooses
> >> the Apple clang compilers
> >> as c an c++ compilers but then chooses the mpicxx, that I installed. It
> >> results in something like:
> >>
> > If you are using dunecontrol, then you specify the compiler the usual
> > way, e.g. in an opts-file via the CXXFLAGS. These are then translated
> > to CMake syntax for you:
> >
> > CONFIGURE_FLAGS="CXX=g++-4.4 CC=gcc-4.4"
> >
> > If you are using CMake without dunecontrol than you specify them as
> > cmake -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-4.4
> > -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/g++-4.4
> >
> > You can also just edit the file CMakeCache.txt in your build directory
> > and rerung cmake there using "cmake ."
> >
> > Markus
> >
> >
> >
> > _______________________________________________
> > Dune mailing list
> > Dune at dune-project.org
> > http://lists.dune-project.org/mailman/listinfo/dune
> 



> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune


-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20141121/5d4ec0ef/attachment.sig>


More information about the Dune mailing list