[CMake] Renaming cache variables and forcing a "cleanup"

Robert Dailey rcdailey at gmail.com
Thu Mar 26 15:30:28 EDT 2009


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090326/ecbe0a73/attachment.htm>


More information about the CMake mailing list