[CMake] Hide target in Visual Studio

James Bigler jamesbigler at gmail.com
Mon Jun 15 13:45:13 EDT 2009


On Sun, Jun 14, 2009 at 8:31 AM, Macumber, Daniel
<Daniel.Macumber at nrel.gov>wrote:

> Hello, I am looking for info on how to hide (make not visible) targets in
> Visual Studio.  I am working with generated code and am compiling several
> hundred individual SWIG dll's (I have a CMake macro that makes one SWIG
> target for each object in the generated code, all the generated code cannot
> be contained in a single SWIG target).  I would like to make one higher
> level target that depends on the hundreds of generated targets.  From the
> IDE I would like to just see this one higher level target with the hundreds
> of generated targets "hidden".  I can't find any target properties that I
> would expect to do this (like "VISIBLE"), does any capability exist in CMake
> to create these targets but hide them (or group beneath a higher level
> target) in the IDE (specifically Visual Studio)?
>
> Thanks a lot,
> Dan
>

I found this site that describes how to use Solution Folders to hide your
projects.
http://blogs.msdn.com/saraford/archive/2008/02/22/did-you-know-you-can-use-solution-folders-to-hide-projects-157.aspx

When I tried this, it looks as though you can specify the Solution Folder in
the .sln file, but you don't specify which projects make it into the
Solution Folder in the .sln file.  My guess is that they are in the binary
suo file which CMake doesn't modify.

Unfortunately, when cmake configures and generates .sln files it will
overwrite the existence of the Solution Folder.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090615/c35588dc/attachment.htm>


More information about the CMake mailing list