[Insight-developers] Include files with the same name, ITK naming conventions.

Karthik Krishnan Karthik.Krishnan at kitware.com
Wed Mar 29 15:30:07 EST 2006


Hi Hans and Developers,

I found this include file in ITK/Utilities/nifti/znzlib/config.h

There are too many libraries that use a name this common, for its 
configuration (such as Curl).

1. I would suggest (if it does not break any backword compatibility or 
at least in future) to prefix such names with the library name, 
tiff/tiff_config.h or itkjpeg/jconfig.h

2. Even better, don't add the entire include tree to 
itkIncludeDirectories.cmake. For instance gdcm is great, cause you 
always say:
     #include "gdcm/config.h".
   This ensures that if you have a config.h installed by some other 
library in /usr/include/, it does not pick the wrong one.

I ran into this problem building a project that uses both ITK and curl 
as external libraries.

Just a convention, but it helps a lot.

Thanks
-karthik


More information about the Insight-developers mailing list