permissions - How to preserve ownership with cmake "install directory" directive? -
use_source_permissions preserves permissions expected:
install( directory dir/ destination dest use_source_permissions )
however, ownership of files not preserved when run
sudo make install
am missing something, or there's no way of accomplishing cleanly cmake?
edit:
- cmake version 3.5.2
- operating system arch linux
i came simplest example think of reproduce issue , still, same happening.
cmake_minimum_required(version 2.8 fatal_error) install(directory ${cmake_current_source_dir}/to_install destination $env{home} use_source_permissions)
then run:
mkdir build cd build cmake .. sudo make install
the original permissions are:
.──[drwxr-xr-x guicc ] test-cmake ├── [-rw-r--r-- guicc ] cmakelists.txt └── [drwxr-xr-x guicc ] to_install ├── [-rw-r--r-- guicc ] file1.txt └── [-rw-r--r-- guicc ] file2.txt
while resulting permissions following:
.──[drwxr-xr-x root ] to_install ├── [-rw-r--r-- root ] file1.txt └── [-rw-r--r-- root ] file2.txt
Comments
Post a Comment