[Cmake] gcc "Changing search order for system directory" warning

Bill Hoffman bill.hoffman at kitware.com
Thu Apr 10 13:40:35 EDT 2003


The reason folks are complaining about the "feature" of gcc,
is because /usr/local/include should not be automatically added
by the compiler, and is not added by any other compiler that I know of.
If cmake stopped putting out /usr/local/include, it would break
all the other compilers.    My guess is that there was no change
in cmake, but that ITK or VTK changed a cmakelist file and now adds
an include path that is in /usr/local/include.

-Bill


At 01:23 PM 4/10/2003, Parag Chandra wrote:
>Hi all,
> 
>I've been using CMake for a while, dutifully upgrading to the latest version as needed in order to compile VTK and ITK. On Linux, once I upgraded to 1.6.6, I started noticing a slew of warnings of the type:
> 
>cc1plus: warning: changing search order for system directory "/usr/local/include"
>cc1plus: warning:   as it has already been specified as a non-system directory
>Is there any way to disable this warning? I don't remember seeing it previously, but I've just upgraded ITK, VTK, and CMake to the latest release versions. I've searched, and it seems like people have been complaining about this particular 'feature' of gcc for months, but the only way to disable it is to disable all warnings. Alternatively, what has changed in CMake that's causing the makefiles it generates to manually add "-I/usr/local/include"? I thought this directory was 'automatically' in the list of -I's, so there was no need to put it in there yourself? Thanks for any help.
> 
>Best regards,
>-Parag Chandra
> 






More information about the CMake mailing list