[CMake] set_source_files_properties for include directories

Marcel Loose loose at astron.nl
Tue Nov 23 07:33:02 EST 2010


>>> On 23-11-2010 at 10:55, in message <4CEB8F76.80300 at korg.it>, Andrea
Galeazzi
<galeazzi at korg.it> wrote: 
> In a project I've got two groups of files having different include 
> paths. These paths have some conflicts so I need to specify just one 

> for each file requires it.
> My first idea was to apply set_source_files_properties with a
property 
> like include_directories but I don't find anything similar. My next 
> attempt is gonna use the COMPILE_FLAGS property, does anybody know a

> more efficient and elegant way to accomplish a such task?
> An equivalent issue was discussed in this thread 
> http://www.mail-archive.com/cmake@cmake.org/msg05276.html but I
didn't 
> find any useful answer.
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

Hi Andrea,

As you noted include_directories is a per-directory setting. So, if
you're free to reorganize your source files, you could put the two
groups of files in two different directories. Then you can use
include_directories() in each directory. Make sure you don't make one of
these directories a subdirectory of the other.

HTH,
Marcel Loose.



More information about the CMake mailing list