[CMake] Why CPack does not _ALWAYS_ use DESTDIR?
Bill Hoffman
bill.hoffman at kitware.com
Mon May 12 18:32:40 EDT 2008
Eric Noulard wrote:
> Hi All,
>
> I did examine a problem with CPack RPM generator which had
> been reported by a user:
> http://public.kitware.com/Bug/view.php?id=7000
>
> The issue concerned file/target installed with absolute path name
> which leads to the following error:
> CMake Error at cmake_install.cmake:40 (FILE):
> file cannot create directory: /absolute/path. Maybe need administrative
> privileges.
>
> /absolute/path being the absolute path used in a DESTINATION option
> of some INSTALL command.
>
> This error can be fixed if we either:
>
> SET(CPACK_SET_DESTDIR "ON") in the CMakeList.txt
> or
> force the same option from within the concerned CPack Generator code.
>
> Afterwards I've tested all CPack generator enabled on my Linux box
> I did discover that ALL of them do encounter the same issue!!
>
> My question is the following,
>
> Why CPack does not _ALWAYS_ use DESTDIR?
> Why should the user
> SET(CPACK_SET_DESTDIR "ON") in the CMakeList.txt
>
> I would really prefer to _ALWAYS_ set it ON i.e. get rid of it :=)
>
> Does anybody knows why we sometimes DO NOT want to use DESTDIR
> for CPack generator?
> If there is no reason we may well enforce DESTDIR ON in the generic
> part of all CPack generator.
>
Because for some projects DESTDIR may not work, and the default has been
set. To change it would break existing projects.
-Bill
More information about the CMake
mailing list