View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014956 | CMake | Documentation | public | 2014-06-04 16:24 | 2016-06-10 14:31 | ||||
Reporter | mwoehlke | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | text | Reproducibility | N/A | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 3.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014956: install(CODE/SCRIPT) and components documentation mismatch | ||||||||
Description | The install(CODE) install(SCRIPT) commands accept a COMPONENT (and appear to DTRT if given one), but the documentation does not mention this. The documentation should be corrected. (Alternatively, one could argue that these are not meant to consider the component, but at least the documentation and actual behavior should agree.) | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |||||||||||
|
Relationships |
Notes | |
(0036124) Brad King (manager) 2014-06-05 09:36 |
It looks like this was implemented back in 2007: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8e832dcf [^] but the documentation was never updated. |
(0036125) Brad King (manager) 2014-06-05 09:39 |
I had never implemented component support for the install(CODE) and install(SCRIPT) commands originally because the code/script could simply check CMAKE_INSTALL_COMPONENT itself. However, the current behavior has been in place for so long we cannot change it now. We should just update the documentation to explain it. We could then add new behavior like using an empty component name or some other explicit option to ask that the install(CODE) or install(SCRIPT) logic work without any component test. This would allow the loaded code to always execute and test CMAKE_INSTALL_COMPONENT itself once again. |
(0036126) mwoehlke (developer) 2014-06-05 11:07 |
> We could then add new behavior like using an empty component name or some other explicit option to ask that the install(CODE) or install(SCRIPT) logic work without any component test. Yes, that's exactly the lines I was thinking along. I'd probably go with either an explicit option (e.g. "ANY_COMPONENT", "ALL_COMPONENTS", "NO_COMPONENT", ...) or a "special" component (probably "ALL"). An explicitly empty component name feels a little odd :-). |
(0036127) David Cole (manager) 2014-06-05 13:34 |
Would have been nice to get feedback on this topic back in 2007... Gotta love that agile development - :-) For consistency's sake and ease of understanding (the INSTALL command is ridiculously hard to understand already), CODE and SCRIPT should have the same behavior and argument support as files. So you want to run CODE or SCRIPT with *any* component. Why should that be possible if it's not possible to install a file with *any* component? Whatever install command signature in the CMakeLists file is required to install a file with *any* component, should be use-able as a CODE installation command with a simple substitution: changing FILE BobLoblaw.txt to CODE "message(\"Hey, who is Bob Loblaw?\")" Sorry for not writing the documentation back then... Not that it's a good excuse, but it was before the days when everything was already so well documented. |
(0036128) mwoehlke (developer) 2014-06-05 14:03 |
> So you want to run CODE or SCRIPT with *any* component. Why should that be possible if it's not possible to install a file with *any* component? I should mention that the use case that started this was wanting to include the cmake_install.cmake of an external project. In this case, it's obvious that we don't want a component check and that the included script will deal with components appropriately. That said, I'm already leaning toward all install signatures having an 'any component' form. :-) |
(0037204) Brad King (manager) 2014-11-13 08:43 |
Regardless of whether we add a new component mode later, we can at least document the current behavior: Help: Document COMPONENT option of install(SCRIPT/CODE) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7361e810 [^] |
(0042559) 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 |
2014-06-04 16:24 | mwoehlke | New Issue | |
2014-06-04 16:25 | mwoehlke | Summary | install(CODE/SCRIPT) and components => install(CODE/SCRIPT) and components documentation mismatch |
2014-06-05 09:24 | Brad King | Relationship added | related to 0005868 |
2014-06-05 09:36 | Brad King | Note Added: 0036124 | |
2014-06-05 09:39 | Brad King | Note Added: 0036125 | |
2014-06-05 11:07 | mwoehlke | Note Added: 0036126 | |
2014-06-05 11:11 | Brad King | Status | new => backlog |
2014-06-05 13:34 | David Cole | Note Added: 0036127 | |
2014-06-05 14:03 | mwoehlke | Note Added: 0036128 | |
2014-11-13 08:34 | Brad King | Relationship added | related to 0015247 |
2014-11-13 08:34 | Brad King | Relationship replaced | has duplicate 0015247 |
2014-11-13 08:43 | Brad King | Note Added: 0037204 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042559 | |
2016-06-10 14:29 | Kitware Robot | Status | backlog => 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 |