[CMake] How to create a custom solution with Visual Studio 2010 generator?

Hendrik Sattler post at hendrik-sattler.de
Tue Sep 22 05:46:20 EDT 2015


Hi,


Am 22. September 2015 08:49:57 MESZ, schrieb "Golebiewski, Jakub" <Jakub.Golebiewski at dnvgl.com>:
>I have about 620 targets (VS projects) so when I open Main Project.sln
>(with 620 projects) in VS it is impossible to work with.
>Currently cmake produces .sln for each Sub Project but includes
>dependencies from other projects and that's something I don’t want
>Since the amount of projects in each .sln increases the further I go
>and most of them (later in the dependency chain) are not possible to
>work
>with either. I'm trying to divide it into .slns that developers could
>work with in VS.

That is exactly what imported targets are for. However, they refer to already built projects. I'd also suggest a two-step approach: first configure and build the thing with all projects in the solution. The libraries need to create cmake build tree export config files. After that step, define a cmake variable to switch to using the previously created export config files only. These create the imported targets and don't show up in the IDE.

HS



More information about the CMake mailing list