[CMake] several questions about cmake

Knox, Kent Kent.Knox at amd.com
Thu Aug 26 12:22:40 EDT 2010


>> 1) The default install directory on Windows is C:\Program Files, or

>> C:\Program Files (x86) on 64 bit. ?This default will not work on

>> Windows 7 (and perhaps Vista), because the user isn't running as

>> administrator anymore, and only administrators can modify that

>> directory. ?There should probably be a warning to that effect on

>> windows systems; otherwise, there are painful ways to run install, but

>> they are painful.

>

>Most developers run as administrator so I don't think there should be a warning.

As a matter of fact, most developers do NOT run as administrator on Win7 and Vista; default users start with a split security token and you have to elevate permissions to write to the 'program files' directory.  The only way around this is to turn off UAC; that's an individual decision whether one feels safe doing that.

I would also like to see the default install directory for cmake change.  In the meantime, I have my cmake script itself change the default:

# On windows, it's convenient to change the default install prefix such that it does NOT point to 'program files'
if( WIN32 AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
                set( CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/install" CACHE PATH "Install path prefix, prepended onto install directories" FORCE )
endif( )



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100826/ca0d9f10/attachment.htm>


More information about the CMake mailing list