MantisBT - CMake
View Issue Details
0014329CMakeCMakepublic2013-07-31 16:592016-06-10 14:31
Andreas Pakulat 
Kitware Robot 
normalminoralways
closedmoved 
Debian GNU/Linuxunstable
CMake 2.8.8 
 
0014329: COMPONENT ignored when appearing after DESTINATION's
It seems that unlike what the documentation suggests the position of the "COMPONENT" part of an install() command is not arbitrary. The attached project shows that the generated cmake_install.cmake file has the 'Unspecified' component set for the 'foo' target, but the expected 'applications' component set for the 'bar' target.

The only difference between both is that the 'bar' target has COMPONENT before the various DESTINATION entries and 'foo' has COMPONENT after them.

I tried CMake 2.8.11.2, 2.8.10 and 2.8.8 and all of them show the same incorrect (IMO) behaviour.
1. Run cmake on the attached minimal example
2. Inspect cmake_install.cmake and verify the components used for the 'foo' and 'bar' targets respectively
No tags attached.
gz cmaketestcase.tar.gz (382) 2013-07-31 16:59
https://public.kitware.com/Bug/file/4831/cmaketestcase.tar.gz
txt CMakeLists.txt (503) 2013-07-31 17:17
https://public.kitware.com/Bug/file/4832/CMakeLists.txt
Issue History
2013-07-31 16:59Andreas PakulatNew Issue
2013-07-31 16:59Andreas PakulatFile Added: cmaketestcase.tar.gz
2013-07-31 17:12Andreas PakulatNote Added: 0033640
2013-07-31 17:17Eric NOULARDFile Added: CMakeLists.txt
2016-06-10 14:29Kitware RobotNote Added: 0042336
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
(0033640)
Andreas Pakulat   
2013-07-31 17:12   
Well, as just pointed out on the CMake mailinglist, my testcase is indeed incorrect. Unfortunately the docs do not make this clear but COMPONENT belongs to each individual DESTINATION, which actually makes sense.

Interestingly specifying COMPONENT before the various DESTINATION's does seem to make it apply to all of them.

So I guess this is a 'works as intended', though I think it would be good to better mark the groups in the docs.
(0042336)
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.