[Dune] cmake docu ?
Carsten Gräser
graeser at mi.fu-berlin.de
Mon Nov 24 11:53:55 CET 2014
Hi Christoph,
Am 21.11.2014 um 17:05 schrieb Christoph GrĂ¼ninger:
> Hi Carsten,
>
>> Since passing custom compiler arguments to 'make' is discouraged
>> because it is 'not the cmake way' we should explain how to
>> setup different build types as a replacement.
>>
>> Obviously you can have several option files with different
>> options and build directories. But I don't know if this is
>> the desired way.
>
> You could either have multiple build directories for your different
> options, or you can reconfigure your module. Depending on what you want
> to change, editing your CMakeCache.txt file would be an option, too.
in principle I'd like to have different build directories
per build type. But I don't know how to set this up. In my
dune options file I could have e.g.
CMAKE_FLAGS="
-DCMAKE_CXX_FLAGS='-g -O2' \
-DCMAKE_CXX_FLAGS_DEBUG='-g -O0 -Wall -pedantic' \
-DCMAKE_CXX_FLAGS_RELEASE='-O3 -DNDEBUG' \
"
But how does dunecontrol interact with cmake wrt the
build types. It seems that I can only activate a single
build type per options file by also adding, e.g.,
-DCMAKE_BUILD_TYPE=Debug
to the CMAKE_FLAGS and setting
BUILDDIR="build-debug"
This means that I'd need one options file per build type.
But then we're essentially bypassing cmakes build types
and could as well set CMAKE_FLAGS differently in each
options file.
Best,
Carsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20141124/148c176a/attachment.sig>
More information about the Dune
mailing list