[Cmake] Hiding Includes

Neil Killeen Neil . Killeen at atnf . csiro . au
Fri, 1 Aug 2003 16:47:10 +1000 (EST)


more on this...

On Fri, 1 Aug 2003, Neil Killeen wrote:

> my system includes ITK, VTK and FLTK
>
> WHen I include VTK only then I get
>
> INCLUDE_FLAGS = -I/DATA/ELARA_3/mitk/Source -I/usr/local/include/vtk
> -I/usr/local/gnu/include -I/usr/local/include
>
> I have no idea why VTK is adding the gnu area.  But the inludes
> are installed in /usr/local/vtk like FLTK

i think the /usr/local/gnu/include area is being included by VTK
because thats where the OpenGL includes are.  Like FLTK, one
specifies these as GL/blah.h   so the -I location must be
/usr/local/gnu/include  rather than  /usr/local/gnu/include/GL
which is a pity.


So in summary:

. Including an installed ITK (in /usr/local/include/InsightToolkit) in
  my project causes no wrong includes and correct

  -I /usr/local/include/InsightToolkit/*        includes


. Including an installed VTK (in /usr/local/include/vtk)  generates
  a correct  -I /usr/local/include/vtk
  a correct  -I /usr/local/gnu/include     (for OpenGL)
  a spurious -I /usr/local/include


. Including an installed FLTK (in /usr/local/include/Fl)  generates
  a correct  -I /usr/local/include



Because one includes FLTK and OpenGL header files with Fl and Gl prefixes,
the -I /usr/local/{gnu}/include     commands are correct.

There is only one spurious /usr/local/include coming from the VTK
installation.  Even if that was eradicated I would still have the
other two includes explicitly included so gcc 3.1.1 would still
moan.

Solutions:

1) Filtering them out with CMake , which it presently cannot do.
2) Filter these warnings out with Dart before it makes the Dartboard
   Dunno if it can do this (any Dart people reading this ?).
3) Upgrade to gcc 3.2 which I understand does not generate these
   warnings


regards
Neil