On 18 August 2016 at 17:26, <tom.edwa...@thefoundry.co.uk> wrote: > I’m working on an application which consists of many different components > surrounding a common core. We ship multiple products from the same source > tree by adding and/or removing components from the output application > directory. > > > > Using CMake’s install system in this environment is proving difficult. > I’ve managed to set things up so that all components are installed to the > same place, which is fine for development but not suitable for testing or > shipping. A proper solution would install only the components needed for an > individual application. > > > > The new EXCLUDE_FROM_ALL option for the install command overcomes one of > the biggest hurdles to reaching that goal. I can now add that option to > every install command, generate a list of component names, and add a custom > target for each application which invokes CMake and has it install only the > relevant components. > > > > The problem now is that I can only install one component at a time, and > that invoking CMake 200+ times to install them all individually is > unacceptably slow. > > > > Looking at the install scripts CMake generates I see lines like this: > > > > > if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "foobar" OR NOT > CMAKE_INSTALL_COMPONENT) > > > > The install process would become much more flexible if STREQUAL were > changed to IN_LIST. As far as I can see this change: a) has no performance > penalty when the component value isn’t a list and b) would be backwards > compatible unless an individual component name contained a semicolon (which > seems an unlikely scenario). > > > > What do the developers think? > > As a side note, I have pointed problems with similar setup, in particular when you want to be able to debug too just after a build, in a context which look like an installed app, with only the files necessary for the app. The discussion led to a ticket for a potential feature: https://gitlab.kitware.com/cmake/cmake/issues/15450 Discussion ended there: http://public.kitware.com/pipermail/cmake/2015-March/060120.html
> -- > > 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