[CMake] Renaming cache variables and forcing a "cleanup"
James Bigler
jamesbigler at gmail.com
Thu Mar 26 17:16:44 EDT 2009
That's how I would do it, though I would change if( FOO_BAR ) to if(
DEFINED FOO_BAR). You only want to do this if the value of FOO_BAR
exists, not whether it is true or not.
James
On Thu, Mar 26, 2009 at 1:30 PM, Robert Dailey <rcdailey at gmail.com> wrote:
> Currently other members on my project have a variable in their cache named
> FOO_BAR. I renamed it to Some_Foo_Bar. It would be unmanageable to have to
> create a conference call or send out an email to everyone saying "Hey,
> delete your cache!". How can I programmatically force this variable to be
> renamed, while still retaining its previous value? Of course I could do
> this:
> option( Some_Foo_Bar "Does a lot of foo..." )
> if( FOO_BAR )
> set( Some_Foo_Bar ${FOO_BAR} )
> unset( FOO_BAR CACHE )
> endif()
> But is this the recommended path?
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
More information about the CMake
mailing list