View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011142CMakeCMakepublic2010-08-18 07:022012-11-10 09:47
ReporterMike McQuaid 
Assigned ToEric NOULARD 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0011142: INSTALL() should have a "make-package-only" option
DescriptionIf you're using CMake for your packaging as well as building and installing (for example using CPack) then I find myself often wanting to install files into the package but not on "make install" or into the build directory.

Currently, to do this I have to do the following:
INSTALL( CODE "
IF( \${CMAKE_INSTALL_PREFIX} MATCHES .*/_CPack_Packages/.* )
....
ENDIF( \${CMAKE_INSTALL_PREFIX} MATCHES .*/_CPack_Packages/.* )
" )

This syntax is pretty unpleasant and it would be nice if I could just, for instance, pass a PACKAGE argument to an install command to have it only do this for generating packages.

Would this be accepted? Is this the wrong approach? If you guide me to creating an acceptable one, I can create a patch for this.

Thanks!
TagsNo tags attached.
Attached Files

 Relationships
related to 0010531closedKitware Robot Install-rules for individual components 

  Notes
(0023913)
Mike McQuaid (reporter)
2010-12-13 07:06

4 months later ping. If I shouldn't be bugs on the bug tracker can you suggest the best way of getting these looked at?

Thanks!
(0024162)
David Cole (manager)
2010-12-15 11:29

There are only a very few number of people who even pay attention to the CMake bug tracker. Most of us are very busy with other stuff.

The best way to approach these things is to ask on the CMake mailing list first, and then, after discussion there leads to "hey, put that in the bug tracker" then put it here.

There are thousands of people reading the CMake mailing list regularly, many of whom chime in with their opinions on various things. Much more likely to get a timely mailing list reply than a bug tracker response. Plain statistics and sheer numbers.
(0031518)
Mike McQuaid (reporter)
2012-11-10 06:35

This can be closed.
(0031520)
Eric NOULARD (developer)
2012-11-10 09:45

Closed per reporter request.

May be some possible way to achieve what is wanted with existing CPack/CMake features.

If you put you install bits in COMPONENT (see COMPONENT option of INSTALL command)
you may well install a different set of component when doing
make install
or
make package.

e.g
CPACK_COMPONENTS_ALL tells CPacks which component should be install
CPACK_INSTALL_CMAKE_PROJECTS another to control what is installed at CPack time
  (see cpack --help-variable CPACK_INSTALL_CMAKE_PROJECTS)
CPACK_PROJECT_CONFIG_FILE control CPack behavior at CPack time, in particular
it enables you to modify/set CPACK_xxx variables on a per-generator basis.

regarding make install,
this one is basically doing a

cmake -P cmake_install.cmake at the root of the project
so you may select which component you want to install
by launching

cmake -DCOMPONENT=myComp -P cmake_install.cmake

there is another bug report related to this (I'll check and add a link)

 Issue History
Date Modified Username Field Change
2010-08-18 07:02 Mike McQuaid New Issue
2010-12-13 07:06 Mike McQuaid Note Added: 0023913
2010-12-15 11:27 David Cole Assigned To => David Cole
2010-12-15 11:27 David Cole Status new => assigned
2010-12-15 11:29 David Cole Note Added: 0024162
2011-10-25 22:25 David Cole Status assigned => backlog
2011-10-25 22:26 David Cole Assigned To David Cole =>
2012-11-10 06:35 Mike McQuaid Note Added: 0031518
2012-11-10 09:45 Eric NOULARD Note Added: 0031520
2012-11-10 09:45 Eric NOULARD Status backlog => closed
2012-11-10 09:45 Eric NOULARD Assigned To => Eric NOULARD
2012-11-10 09:45 Eric NOULARD Resolution open => fixed
2012-11-10 09:47 Eric NOULARD Relationship added related to 0010531


Copyright © 2000 - 2018 MantisBT Team