On 19 Jun 2013, at 00:35, Erik Schnetter <[email protected]> wrote:

> 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. 
> <http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Preset-Output-Variables.html>):
> 
> 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.

It would also be good to display the automatically-chosen settings during 
configuration, so that users can see how they are different to what they are 
using, in the case that they have been overridden.

-- 
Ian Hinder
http://numrel.aei.mpg.de/people/hinder

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Users mailing list
[email protected]
http://lists.einsteintoolkit.org/mailman/listinfo/users

Reply via email to