[CMake] Visual Studio solution folders with 1 item in them

David Cole DLRdave at aol.com
Thu Jul 23 12:45:41 EDT 2015


CMake only puts projects (libraries, executables, custom targets) inside of
solution folders. There's currently no way to add an individual file in
them directly.


D



On Thu, Jul 23, 2015 at 11:24 AM, Andrei Porumb <anporumb at microsoft.com>
wrote:

>  Hello Parag,
>
>
>
>                 I am very sorry to say that your suggestion achieves
> something different (similar, but different). SOURCE_GROUP creates a
> "project filter" (that's an entity under a project). A "project filter" is
> not a "solution folder" (yeah, they look very similar). Picture included
> with a solution folder and a project filter.
>
>
>
>                 What I want is to place some random files under the
> solution folder. These files are not CMake targets.
>
>
>
>
>
> Best Regards,
>
> Andrei Porumb
>
>
>
> "a skhizein equals to 1 software rename/dev cycle"
>
>
>
> *From:* Parag Chandra [mailto:parag at ionicsecurity.com]
> *Sent:* Thursday, July 23, 2015 7:28 AM
> *To:* Andrei Porumb <anporumb at microsoft.com>; J Decker <d3ck0r at gmail.com>
> *Cc:* cmake at cmake.org
> *Subject:* Re: [CMake] Visual Studio solution folders with 1 item in them
>
>
>
> Couldn’t you use the source_group() command to do this? That is how I
> arbitrarily group my source files into folders within Visual Studio.
>
>
>
>
> *Parag Chandra*
> Senior Software Engineer, Mobile Team
> Mobile: +1.919.824.1410
>
> [image: Image removed by sender.] <https://ionic.com>
>
> Ionic Security Inc.
> 1170 Peachtree St. NE STE 400, Atlanta, GA 30309
>
>
>
> *From: *Andrei Porumb <anporumb at microsoft.com>
> *Date: *Wednesday, July 22, 2015 at 11:27 PM
> *To: *J Decker <d3ck0r at gmail.com>
> *Cc: *"cmake at cmake.org" <cmake at cmake.org>
> *Subject: *Re: [CMake] Visual Studio solution folders with 1 item in them
>
>
>
> What you are suggesting will  add some previously build targets to the
> solution inside a solution folder. What I want is to simply have a file
> inside a solution folder.
>
>
>
> Best Regards,
>
> Andrei Porumb
>
>
>
> "a skhizein equals to 1 software rename/dev cycle"
>
>
>
> *From:* J Decker [mailto:d3ck0r at gmail.com <d3ck0r at gmail.com>]
> *Sent:* Wednesday, July 22, 2015 7:13 PM
> *To:* Andrei Porumb <anporumb at microsoft.com>
> *Cc:* cmake at cmake.org
> *Subject:* Re: [CMake] Visual Studio solution folders with 1 item in them
>
>
>
> globally set
>
>
>
> set_property(GLOBAL PROPERTY USE_FOLDERS On)
>
>
>
>
>
> SET_TARGET_PROPERTIES(<target> PROPERTIES
>
>                   FOLDER "folder name"
>
> )
>
>
>
>
>
>
>
>
>
> On Wed, Jul 22, 2015 at 3:04 PM, Andrei Porumb <anporumb at microsoft.com>
> wrote:
>
>  Hello CMake,
>
>
>
>                 Thank you for everything so far!
>
>
>
>                 I am migrating some cross platform projects to CMake.
> Naturally our devs (myself included) like things to look "in a certain
> way". And if "certain way" can be produced by CMake then adoption is
> smoothened.
>
>
>
>                 That being said, this is the issue at hand. How can I
> instruct CMake to produce some harmless Visual Studio solution folders
> having some non-target items in them? (I know how to insert targets under
> Visual Studio solution folders, but I need simple files). Like in the
> picture below. Notice that "Specs" solution folder contains 3 items, a text
> file, a bitmap and a sequenceDiagram, none of which are CMake targets.
>
>
>
>
>
>                 Any help is greatly appreciated.
>
>
>
> Best Regards,
>
> Andrei Porumb
>
>
>
> "a skhizein equals to 1 software rename/dev cycle"
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150723/0cd64aca/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 24548 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150723/0cd64aca/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 25768 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150723/0cd64aca/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD000.jpg
Type: image/jpeg
Size: 823 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150723/0cd64aca/attachment-0001.jpg>


More information about the CMake mailing list