[CMake] How to run an install command as administrator?

Gonzalo Garramuño ggarra13 at gmail.com
Sat May 28 12:58:28 EDT 2016


On 26/05/2016 01:16 p.m., Juan Dent wrote:
>
> Hi,
>
> I have a simple CMakeLists.txt that tries to install at a place in the 
> drive that requires administrator privileges. How can I make that 
> install command to run as administrator, is there a way in CMake?
>
If you are on Linux or Mac, it is easy.  Just do:

     $ sudo make install

If you are on Windows, create a .bat file with the cmake command you 
want to run and then RMB on it and select Run As Administrator.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160528/83c94ded/attachment.html>


More information about the CMake mailing list