MantisBT - CMake
View Issue Details
0014943CMakeCPackpublic2014-05-29 06:252016-06-10 14:31
Thierry Valentin 
Kitware Robot 
normalminoralways
closedmoved 
Linux 64 Debian JessieDebianJessie
CMake 2.8.12.1 
 
0014943: Add an option to cpack to select which component package(s) to generate
Hello,
In a component-based configuration, the command "cpack --config CPackConfig.cmake" will generate a package for all components listed in CPACK_COMPONENTS_ALL.

But in some situations we do not want all packages to be generated, so it would be useful to restrict the package generation to one or more components specified on the command line:

cpack --config CPackConfig.cmake --component comp1 --component comp2 ...

A typical use case:
I use Jenkins to build software binaries for several platforms. Each platform is built in a in separate job. I also need to produce the software documentation which is common to all platforms, so I only need a single job to build it.

In the platform dependent jobs I would like to be able to generate binary packages only:
- cpack --config CPackConfig.cmake --component runtime --component developer-kit

In the documentation generation job, I would like to be able to generate documentation packages only:
- cpack --config CPackConfig.cmake --component doc-user --component doc-developer

Thanks

No tags attached.
Issue History
2014-05-29 06:25Thierry ValentinNew Issue
2014-05-29 07:42Nils GladitzNote Added: 0035962
2014-05-29 09:49Thierry ValentinNote Added: 0035967
2016-06-10 14:29Kitware RobotNote Added: 0042554
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035962)
Nils Gladitz   
2014-05-29 07:42   
You can set CPack variables from the command line with -D.
e.g. cpack -G ZIP -D CPACK_COMPONENTS_ALL=foo
The space between -D and the variable name seems to be required.

Multiple components can be separated by semicolon but you will have to take care that they are properly escaped for your environment.
(0035967)
Thierry Valentin   
2014-05-29 09:49   
Thanks a lot for the hint.
I tried this solution but without the space between -D and the variable name, and it did not work. So I confirm this is required.
Thanks for your help
(0042554)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.