On 2016-05-26 10:16-0600 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?

CMake configures a build and install, but does not actually do those
tasks.  For example, for the "Unix Makefiles" generator, cmake
configures the Makefiles, but to do the actual build you typically use

make all

and to do the actual install (using the installation prefix you have
configured with CMake) you typically use

make install

So the answer to your question for that latter case is to do that
action with administrator privileges.  For example, on Unix systems you
would log in as the root account first before running "make install".

And similarly for other generators and other platforms that require
administrator privileges to install in the installation location you
have specified with CMake.

Alan

__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to