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

Comments?

-- 
Philip Lowman
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to