Erik Schnetter schnetter at cct.lsu.edu
Tue Jun 18 17:35:54 CDT 2013

We discussed recently how CFLAGS and other compiler options should be
handled when configuring Cactus. On one hand, Cactus should automatically
determine certain necessary settings depending on compiler vendor and
operating system (e.g. choosing -std=c99). On the other hand, the user
should have an easy way to add to these flags, as well as the possibility
to override the automatically chosen flags.

I suggest the following way to do this. This roughly follows autoconf
conventions (see e.g. <

CCTK_CFLAGS is a Cactus variable that is automatically set to something
reasonable to make things work.

CFLAGS is a "user" variable. It defaults to being empty; the user can leave
it unset, or can use it to add to CCTK_CFLAGS.

The Makefile will use $(CCTK_CFLAGS) $(CFLAGS) when building.

Cactus will never set CFLAGS. If the user sets CCTK_CFLAGS, then this
completely overrides Cactus -- this is for experts, or for emergency cases
where Cactus doesn't get it right, e.g. when porting Cactus to a new system.

This would apply to all variables where multiple values make sense. It
would e.g. not apply to CC or DEBUG.


Erik Schnetter <schnetter at cct.lsu.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20130618/ef9aacd1/attachment.html 

More information about the Users mailing list