[CMake] unset() command
Brad King
brad.king at kitware.com
Wed Aug 20 10:49:20 EDT 2008
Philip Lowman wrote:
> So I submitted a patch to add a new unset() command to CMake. The
> command will unset normal or cache variables (causing them to become
> undefined). The command also supports unsetting environment variables,
> in case anyone has to do that.
>
> The primary use case that drove me to implement this was this:
>
> find_library(FOO_LIBRARY foo)
> if(MSVC OR SEARCH_FOO_DEBUG)
> find_library(FOO_LIBRARY_DEBUG food)
> else()
> unset(FOO_LIBRARY_DEBUG)
> set(FOO_LIBRARY_DEBUG ${FOO_LIBRARY})
> endif()
>
> http://public.kitware.com/Bug/view.php?id=7507
I think the best place for discussion on this is in the bug entry
itself. I'll make comments there.
-Brad
More information about the CMake
mailing list