View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015840 | CMake | CPack | public | 2015-11-10 08:31 | 2016-06-10 14:31 | ||||
Reporter | Mark Stijnman | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 3.3.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015840: CPack unspecified behavior for same file in multiple components | ||||||||
Description | In component-based installs, if two components contain the same file, installing to the same destination, CPack has unspecified behavior. For example, the archive generators support it, the WiX generator doesn't. A common use case could be two executables in separate components, who each include the same DLL in their component. According to https://cmake.org/Wiki/CMake:Component_Install_With_CPack, [^] under "Rules", it says: "1. An object cannot belong to several COMPONENT". But clearly, several generators allow it anyway. Either this "rule 1" should be enforced in all generators equally, or should be relaxed (and then work for all generators). | ||||||||
Steps To Reproduce | Use the attached CMakeLists.txt, which defines two components, which both install a unique file, as well as the same common file. Run cmake and cpack. The ZIP file generation works, and contains the expected 3 files. The WiX generator fails. (This example needs WiX to run) | ||||||||
Additional Information | Strictly enforcing rule 1 should not block the use case of shared files, as another way to handle this would be to define a separate component for the shared files, and set a dependency between any component that requires it. You could even argue that this is the preferred way anyway. Enforcement of rule 1 should be done in the generator base class. The error message should probably mention the above strategy as a possible solution. If this rule 1 is going to be strictly enforced, this will break projects that already rely on this unspecified behavior, so in that case a new policy should be introduced. Documentation of the policy should also mention the strategy above. If it is decided to relax rule 1 instead, keep in mind that this is only well defined if two files from separate components but with the same destination are indeed identical. If not, this should be considered an error, and the CPack generator base class should check for this. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CMakeLists.txt [^] (286 bytes) 2015-11-10 08:31 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0042884) Kitware Robot (administrator) 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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-11-10 08:31 | Mark Stijnman | New Issue | |
2015-11-10 08:31 | Mark Stijnman | File Added: CMakeLists.txt | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042884 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |