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

Hendrik Sattler post at hendrik-sattler.de
Fri Jan 28 03:55:45 EST 2011


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




More information about the CMake mailing list