[Users] EXTRA_CFLAGS

Ian Hinder ian.hinder at aei.mpg.de
Sun Jun 30 09:40:58 CDT 2013


On 19 Jun 2013, at 00:35, Erik Schnetter <schnetter at cct.lsu.edu> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20130630/89d6be12/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1936 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20130630/89d6be12/attachment.bin 


More information about the Users mailing list