[MITgcm-devel] packages, cpp, etc.

Ed Hill ed at eh3.com
Wed Oct 22 14:28:40 EDT 2003


On Wed, 2003-10-22 at 15:55, Patrick Heimbach wrote:
> Another thing re. GMREDI_OPTIONS.h
> 
> I looked into global_with_exf to take it
> as an example for how to incorporate it to the
> code_ad/ stuff, however I find:
> 
> #ifndef GMREDI_OPTIONS_H
> #define GMREDI_OPTIONS_H
> #include "PACKAGES_CONFIG.h"
> #ifdef ALLOW_GMREDI
> 
> #include "CPP_OPTIONS.h"
> 
> etc...
> 
> I.e. there's both
> #include "PACKAGES_CONFIG.h"
> and
> #include "CPP_OPTIONS.h"
> 
> I assume that's not the way it should be, shoud it?


Hi Patrick,

The format above is correct.  The intent is as follows:

  - GMREDI_OPTIONS_H is an "inclusion barrier".  We're adding 
    these file-name-based "barriers" to all of our headers to 
    prevent multiple inclusions.

  - #include "PACKAGES_CONFIG.h" is now the *ONE* file that is 
    supposed to contain the ALLOW_${PACKAGE_NAME} definitions.

  - #include "CPP_OPTIONS.h" is still necessary since there may
    be specific options that need to be defined or undefined.
    Note that this file is no longer allowed to contain
    ALLOW_${PACKAGE_NAME}-type definitions

I'll write up a better description in the devel-HOWTO in a few days.

Ed
.
-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Room 54-1424;  77 Massachusetts Ave.
            Cambridge, MA 02139-4307
email:   eh3 at mit.edu,  ed at eh3.com
URL:     http://web.mit.edu/eh3/
phone:   617-253-0098
fax:     617-253-4464
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20031022/ffc21060/attachment.sig>


More information about the MITgcm-devel mailing list