[CMake] CMake performs search for includes/libs in non-default compiler search paths.

Michael Wild themiwi at gmail.com
Fri Jan 28 04:04:14 EST 2011


On 01/28/2011 09:55 AM, Hendrik Sattler wrote:
> Zitat von "Michael Wild" <themiwi at gmail.com>:
> 
>> Now, if you want to mix-and-match, by having this include-path:
>> -I/usr/include -I/usr/local/include
>>
>> (i.e. use /usr/include/foo.h and /usr/local/include/bar.h) you're in
>> trouble, because CMake will filter out the /usr/include directory,
>> leaving you with /usr/local/include/foo.h being found. Rats.
> 
> Note that some compilers, e.g. gcc, ignore system include path that are
> given with -I. Citing from its manpage:
> "If you really need to change the search order for system directories,
> use the -nostdinc and/or -isystem options."
> 
> HS

So, that's causing even more trouble, also considering my further
example with duplicate headers in different prefixes.

Michael



More information about the CMake mailing list