[CMake] position of INCLUDE_DIRECTORIES() significant ?

William A. Hoffman billlist at nycap.rr.com
Sun Feb 12 13:26:18 EST 2006


At 01:08 PM 2/12/2006, Alexander Neundorf wrote:
>Hi, 
> 
>does it matter whether I write  
> 
>include_directories( /usr/include/foo ) 
>add_executable(test test.c) 
> 


>or  
> 
>add_executable(test test.c) 
>include_directories( /usr/include/foo ) 
> 
>in the CMakeLists.txt ? 
>For me with the Makefile generator both work. Is this also the case for 
>the other generators ? 
> 

1 is the preferred way to do it, and at some point in the future it might
make a difference.   Right now the include directory is a directory property,
but really it should be a target property.

-Bill



More information about the CMake mailing list