Skip to content

Install location requires sudo #352

@spinicist

Description

@spinicist

Brief Issue Summary

I would like to install my project to /usr/local using the install CMake target. On my (Mac) system this requires sudo permissions. Instead of asking for permissions, CMake Tools simply fails. I can run sudo ninja install from the command-line. However, if CMake has to build a binary during this step, it will be written with the owner set to root. Then, if I make another target within CMake Tools, e.g. all, it will fail because it cannot overwrite the file.

Expected:

Somehow CMake Tools asks for my password so that I can install to /usr/local.

Other Notes/Information

I admit this may be a difficult problem to solve well. The reason I would like to install to /usr/local is that I use BATS as my test framework, and since Apple added System Integrity Protection (SIP) to Mac OS X, child processes no longer receive the DYLD_LIBRARY_PATH variable in their environment. This means my BATS tests cannot find my shared libraries, unless they are installed to a system path such as /usr/local 😡

If anyone has a better suggestion as a workaround, I am all ears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: installenhancementan enhancement to the product that is either not present or an improvement to an existing feature

    Type

    No type

    Projects

    Status

    Pending Prioritization

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions