[CMake] How to check/set CMAKE_INSTALL_PREFIX
Brad King
brad.king at kitware.com
Tue Oct 17 09:10:03 EDT 2006
Alexander Neundorf wrote:
> -------- Original-Nachricht --------
> Datum: Mon, 16 Oct 2006 14:02:28 -0400
> Von: Brad King <brad.king at kitware.com>
> An: Eric Noulard <eric.noulard at gmail.com>
> Betreff: Re: [CMake] How to check/set CMAKE_INSTALL_PREFIX
>
>> Eric Noulard wrote:
>>> What is the good way to change the default value of CMAKE_INSTALL_PREFIX
>>> besides the usual:
>> This question has come up several times and I've been deferring a fix
>> until a project-specified initial cache feature is implemented. That
>> feature has been delayed because it is tricky.
>>
>> I've just added a fix to CVS CMake for this. It will be in 2.4.4 (the
>> upcoming patch release). Basically your code needs to know whether the
>> current value of CMAKE_INSTALL_PREFIX was set by the user on the command
>> line or initialized by CMake. Now when CMake initializes the variable
>> it also sets CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT to true. This
>
> Does it do this for all internal cmake variables or only for CMAKE_INSTALL_PREFIX ?
Just the install prefix. I don't want to do it for every variable. For
that we need a PreLoad.cmake feature (which is partially implemented but
not really working) to have project-specific initial cache entries. I
just put this one in as a hack because so many users have asked for this
specific capability and it is a simple change before the 2.4.4 release.
-Brad
More information about the CMake
mailing list