View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014955CMakeCMakepublic2014-06-04 16:072016-06-10 14:31
Reportermwoehlke 
Assigned ToKitware Robot 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0014955: Support install of external projects, with component-like selection
DescriptionWhile considering ways to make a useful 'install' target for a superbuild-like project (Slicer), JC and I decided it would be nice if CMake had a mechanism similar to CPACK_INSTALL_CMAKE_PROJECTS.

We propose CMAKE_INSTALL_CMAKE_PROJECTS, a list of sets of three values: build directory, project name, install prefix. If set, when the install script is generated, it would include the install script of each such project (i.e. "include(<build_dir>/cmake_install.cmake)") after first modifying the install prefix as specified. (An empty or relative prefix would be relative to the parent install prefix.) A system for selecting project(s) to install, similar to selecting component(s) to install, would be provided.

We could then modify external project support (e.g. this would probably happen first in Artichoke) to have a command like:

  ExternalProject_Install(<name> [DESTINATION <path>] [CPACK_COMPONENT <component>])

...which would set both CMAKE_INSTALL_CMAKE_PROJECTS and, if a CPACK_COMPONENT is specified, CPACK_INSTALL_CMAKE_PROJECTS.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0036118)
Jean-Christophe Fillion-Robin (reporter)
2014-06-04 17:32

Few clarifications:

* The signature of "ExternalProject_Install" could be changed to accept "COMPONENT" instead of "CPACK_COMPONENT". That would be consistent with the existing "install()" command

* The function "ExternalProject_Install" would set a variable named "EP_INSTALL_CMAKE_PROJECTS" that would be used to configure the main sub project using:
   -DCMAKE_INSTALL_CMAKE_PROJECTS:STRING=${EP_INSTALL_CMAKE_PROJECTS}

* Support for "make install" in the top level project would then done by "forwarding" and executing the install target in the main subproject.
(0036120)
mwoehlke (developer)
2014-06-04 18:08

> The signature of "ExternalProject_Install" could be changed to accept "COMPONENT" instead of "CPACK_COMPONENT.

For clarification, my original reasoning was to make it clear that this is only relevant to CPACK.

Another possibility is if the subproject install overrides the install component of the subproject, which may or may not be desirable.... further discussion may be needed.

> The function "ExternalProject_Install" would set a variable named "EP_INSTALL_CMAKE_PROJECTS" that would be used to configure the main sub project using '-DCMAKE_INSTALL_CMAKE_PROJECTS:STRING=${EP_INSTALL_CMAKE_PROJECTS}'

I wouldn't do this (directly), as it forces a particular workflow (inner project produces the package). I would instead have ExternalProject_Install set CMAKE_INSTALL_CMAKE_PROJECTS, and have e.g. ExternalProject_Add_Main that would forward as described and then unset CMAKE_INSTALL_CMAKE_PROJECTS. This could also do other useful things, e.g. set up the install forward target.
(0042558)
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.

 Issue History
Date Modified Username Field Change
2014-06-04 16:07 mwoehlke New Issue
2014-06-04 16:19 Brad King Status new => backlog
2014-06-04 17:32 Jean-Christophe Fillion-Robin Note Added: 0036118
2014-06-04 18:08 mwoehlke Note Added: 0036120
2016-06-10 14:29 Kitware Robot Note Added: 0042558
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


Copyright © 2000 - 2018 MantisBT Team