[CMake] Custom target with just cmake files in it

David Cole david.cole at kitware.com
Tue Oct 25 11:50:37 EDT 2011


On Fri, Oct 21, 2011 at 4:08 PM, Robert Dailey <rcdailey at gmail.com> wrote:

> I have a folder with a bunch of cmake modules in it that contain my custom
> CMake code used across all projects.
>
> I only generate for visual studio, so I was thinking it would be useful to
> have a dummy project in my solution named "_cmake" that contains nothing but
> my *.cmake files in it.
>
> How would I create such a project? It needs to show up in ANY solution
> opened that is generated at any level via call to project().
>
>
If you want it to show up in any sln file generated by any call to the
project command, then you're going to need to modify CMake source code to
get that to happen.

Another alternative would be to add a custom target, and specify all your
cmake files as "SOURCES" to the add_custom_target call. But that will only
show up in solution files that include the custom target.


HTH,
David


---------
> Robert Dailey
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111025/a68df2e4/attachment-0001.htm>


More information about the CMake mailing list