[cmake-developers] [CMake 0013490]: CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION not honored

Mantis Bug Tracker mantis at public.kitware.com
Sat Aug 25 17:11:27 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13490 
====================================================================== 
Reported By:                sigma
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13490
Category:                   CPack
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-08-25 17:11 EDT
Last Modified:              2012-08-25 17:11 EDT
====================================================================== 
Summary:                    CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION not
honored
Description: 
When I set CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION to OFF this is not
honored. I am basically trying to use it with CPack:

SET(CPACK_INSTALL_COMMANDS "cmake
-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=OFF
-DCPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=OFF -P cmake_install.cmake")

so as to overcome the very annoying fatal error:

...
ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ...

Some of my install(FILES .. DESTINATION ... ) use absolute paths, but I am not
even sure why installing files with an absolute path as the install destination
would be a fatal error, if anything it should be a warning at most. 

cmake_install.cmake has checks for these variables, but they are always set to
1. 

Is there another way to set these variables to 0 (OFF) that works?

Is there a way to convert absolute to relative paths? 

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-08-25 17:11 sigma          New Issue                                    
======================================================================




More information about the cmake-developers mailing list