[CMake] Need some directions for non-trivial setup

David Cole david.cole at kitware.com
Wed Dec 8 11:20:41 EST 2010


Every "project(...)" command in a CMakeLists.txt file (we expect at
most one in any given CMakeLists.txt file) results in a *.sln file
being generated for use with Visual Studio.

Every add_library(...), add_executable(...) and add_custom_target(...)
results in a *.vcproj or *.vcxproj file being generated for Visual
Studio.

The behavior you are seeing is probably due to the use of the
"add_subdirectory(...)" command. CMake does not "scan" anything
automatically. You must explicitly say what CMakeLists.txt files in
sub-directories you want to read.


HTH,
David


On Wed, Dec 8, 2010 at 10:57 AM, Klaim <mjklaim at gmail.com> wrote:
> Sorry, a part of my sentence got cut :
>  I don't understand what makes, for example, the CLang project generate
> different projects in the Visual Studio solution generated depending on the
> project folder content in LLVM repo. Or maybe it's automatic because Cmake
> will scan all the subfolders of folders where there is a CMakeLists.txt?
>
> On Wed, Dec 8, 2010 at 16:53, Klaim <mjklaim at gmail.com> wrote:
>>
>> I don't understand what makes, for example, the CLang project generate
>> different projects in the solution folder depending on the project folder
>> content in LLVM repo? Or maybe it's automatic because Cmake will scan all
>> the subfolders of folders where there is a CMakeLists.txt?
>
> _______________________________________________
> 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
>


More information about the CMake mailing list