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? 
-- 

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

Reply via email to