[Dune] CMake to link an executable

Aleksejs Fomins aleksejs.fomins at lspr.ch
Wed Jul 29 15:58:13 CEST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks Markus, it was very helpful :)

The solution was
add_library(A STATIC a.c)
target_link_libraries(test a)

Best,
Aleksejs

On 29/07/15 15:11, Markus Blatt wrote:
> On Wed, Jul 29, 2015 at 02:24:09PM +0200, Aleksejs Fomins wrote:
>> Dear Dune,
>>
>> I am currently testing the performance of integration in our curvilinear code, and for that purpose I need to temporarily integrate an external library into a dummy dune module.
>>
>> The library I am trying out is
>> http://ab-initio.mit.edu/wiki/index.php/Cubature
>>
>> To use this library, one needs to include a corresponding .h file, and to link a corresponding .c file, namely
>>
> 
> cmake --help-command target_link_libraries 
> and 
> cmake --help-command find_library
> 
> should help you.
> 
> 
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJVuNv1AAoJEDkNM7UOEwMZPWkP/iB9r6xEW7Vf7TY+QWcdrzqN
db9nPDAm4ND6ifwiYhKVcApuU0d0MfQJmJGmuC0GQv0ywamilkc605WAL3B9HDqL
PnXkEbNdBC2RPLLVi52W3LtW1Oa+VBKlUs8y8pxmAzZJ0AYTS1B5qiCkSBlO/R2X
UqiDJQ6ojiawkuREVti/HECSTLOVs8Ne0xSLTtkxQb+mLZqHeVs0MLxTJPtPXcdn
qZjPBid8jv/DprOR/kvrRAMO5ag3GtB+O8Tt+Rejibu/jyAjDX4aDZIDwjIB6HbU
pNxWzwbl+lnxd0QrSxZyMSPOOIiBvbBgKeqMu+tk6Rl007Vhb7V4jh5Hd3PAqJZ+
9rI0QtNHt9Ua7iGDPrZG9B/hlvTlkCEaznJDF740uq9x9LUWQgHm6LFU+YcF3Pc+
leOC39bu8c+1cfC7QFJ/gYSP727Emscjf1InrihBc1PFIoojf1R1PQPuVsjIrDkM
Uhq6ETwStlmaXBDmZJ5goWrWK+VorWgsc1tSdAl6roe3W+JimgQT/OpFme6ZEzbP
AnhBn0DCX1y3HSrDc65x4wKqYBbsE6Enc49niSlAKFcJbYW3KRAPM+WOG+fetfPo
oYaoGxvy47EEAJxSAVe/J97RBaFf7ztX6rcLqJuPqa86kig8IdUMkrytImpgowiS
o5l/ZCRcAtsnkH2RkTJH
=rhGx
-----END PGP SIGNATURE-----




More information about the Dune mailing list