[cmake-developers] [CMake 0015665]: CPack and absolute paths

Mantis Bug Tracker mantis at public.kitware.com
Mon Jul 27 08:34:16 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15665 
====================================================================== 
Reported By:                Lectem
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15665
Category:                   CPack
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-07-27 08:34 EDT
Last Modified:              2015-07-27 08:34 EDT
====================================================================== 
Summary:                    CPack and absolute paths
Description: 
When running make package (or cpack), with a target having an absolute path as
its destination, it will try to install it there instead of using the temporary
folder.

When using this script : 

   add_library(mylib foo.cpp)
   install(TARGETS mylib DESTINATION /some/custom/dir)
   include(CPack)

cpack will install mylib to /some/custom/dir which is obviously not what we
want.

Plus, generators such as TGZ will not include those files, while they actually
support absolute paths.

What I suggest is 

1. Do not make the install, or redirect it in a temp directory
2. Trigger a Warning/Error


====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-07-27 08:34 Lectem         New Issue                                    
======================================================================



More information about the cmake-developers mailing list