Somewhat related, the following thread from a few days ago may be helpful: http://public.kitware.com/pipermail/cmake/2016-July/063897.html
In short, you probably want to use add_custom_target() without the ALL keyword. On Thu, Jul 14, 2016 at 8:35 AM, Michael Legleux <legl...@gmail.com> wrote: > I have a use case that I haven't had much luck googling. > > I have a project that needs to have files visible in the Visual Studio IDE > but marked with the red "Excluded from build" symbol. > The source files are not needed in any way for the visual studio project, > but for example, they use functions defined in project source files, so > they need to be searchable and updatable from the visual studio ide. > > I can't seem to find any nice clean way to do this with cmake (or anyway > yet for that matter.) > > -- > > 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 > -- Craig Scott Melbourne, Australia http://crascit.com
-- 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