[CMake] Creating filters (a.k.a. subdirectories) for Visual Studio projects

Michael Jackson mike.jackson at bluequartz.net
Tue Mar 3 09:07:45 EST 2009



On Mar 3, 2009, at 8:56 AM, Eric Noulard wrote:

> 2009/3/3 Michael Jackson <mike.jackson at bluequartz.net>:
>>
>>
>>
>> On Mar 3, 2009, at 5:26 AM, Eric Noulard wrote:
>>
>>> 2009/3/3 Michael Schantin <michael at schantin.net>:
>>>>
>>>>
>>>> INCLUDE(${PROJECT_SOURCE_DIR}/mySubDir1/CMakeLists.txt)
>>>> INCLUDE(${PROJECT_SOURCE_DIR}/mySubDir2/CMakeLists.txt)
>>>
>>> You usually don't "INCLUDE" CMakeLists.txt
>>> you usually ADD_SUBDIRECTOR
>>
>> That depends on the context in which you use 'include'. Say you  
>> have some
>> cmake files that just contain some common cmake code or some  
>> macros, then
>> using the 'include' command is just fine.
>
> Yes I agree,
> however in that case I usually chose another name for the included  
> file.
>
> i.e.
>
> I'd rather:
>
> INCLUDE(Src/Common/Common.cmake)
>
> than:
>
> INCLUDE(Src/Common/CMakeLists.txt)
>
>
>
> -- 
> Erk

Yes, I completely agree with that sentiment.

_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio




More information about the CMake mailing list