[CMake] set_source_files_properties for includedirectories

Michael Hertling mhertling at online.de
Fri Nov 26 11:28:24 EST 2010


On 11/26/2010 09:40 AM, Andrea Galeazzi wrote:
> Michael Hertling ha scritto:
>> On 11/23/2010 03:23 PM, Andrea Galeazzi wrote:
>>    
>>> Marcel Loose ha scritto:
>>>      
>>>>>>> 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 bywww.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.
>>>>
>>>>
>>>> __________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 5639 (20101122) __________
>>>>
>>>> Il messaggioè  stato controllato da ESET NOD32 Antivirus.
>>>>
>>>> www.nod32.it
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>        
>>> Yes, the sources are splitted in different directories but the
>>> CMakeLists.txt is just one:
>>> -Root
>>>    CMakeLists.txt
>>>    -dir1
>>>          file1.cpp
>>>          file2.cpp
>>>          ......
>>>    -dir2
>>>           file1.cpp
>>>           file2.cpp
>>>           .........
>>> I'd like to generate just one IDE project from this project.
>>>      
>>
>> FYI, see [1] and especially [2].
>>
>> Regards,
>>
>> Michael
>>
>> [1]http://public.kitware.com/Bug/view.php?id=1968
>> [2]http://public.kitware.com/Bug/view.php?id=8189
>> _______________________________________________
>> Powered bywww.kitware.com
>>
>> Visit other Kitware open-source projects athttp://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
>>
>> __________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 5647 (20101125) __________
>>
>> Il messaggioè  stato controllato da ESET NOD32 Antivirus.
>>
>> www.nod32.it
>>
>>
>>
>>
>>    
> Sorry, I don't understand, what's [1] or [2]?

These are the references at the foot of my post; since citations of
URLs, books etc. tend to be quite long it's handy to use numbered
placeholders instead of embedding them in the text immediately.

Regards,

Michael


More information about the CMake mailing list