Re: [CMake] excluded from build in Visual Studio project
Hi, I think you can add any files to a library/executable target and they will show up in the IDE. If the files are actual source code files such as .cpp/.c/.cxx you can set HEADER_FILE_ONLY property on them so that they do no get compiled when the target is built the https://cmake.org/cmake/help/v3.6/prop_sf/HEADER_FILE_ONLY.html. HTH Guillaume On Wed, Jul 13, 2016 at 6:40 PM, Craig Scottwrote: > short, you probably want to use add_custom_ta -- Guillaume Dumont = dumont.guilla...@gmail.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
Re: [CMake] excluded from build in Visual Studio project
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 Legleuxwrote: > 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
[CMake] excluded from build in Visual Studio project
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