On Thu, Oct 29, 2009 at 7:51 PM, Alexander Neundorf <a.neundorf-w...@gmx.net> wrote: > On Thursday 29 October 2009, Mathieu Malaterre wrote: >> On Thu, Oct 29, 2009 at 7:16 PM, Alexander Neundorf >> >> <a.neundorf-w...@gmx.net> wrote: >> > On Thursday 29 October 2009, Mathieu Malaterre wrote: >> > ... >> > >> >> Done: >> >> http://cmake.org/Bug/view.php?id=9793 >> >> >> >> Bug report include the test I used. Unfortunately find_package caches >> >> results, so one need to manually remove cmakecache.txt file before >> >> re-running this. >> > >> > You can also use cmake-gui to delete the respective variables (or do it >> > manually in CMakeCache.txt), no need to start completely from scratch. >> >> I wanted to do that in a for loop, but could not find a way to do it >> programmatically. This would greatly ease the writing of regression >> testing. Or else I am missing something to clear anything that has >> been cached by find_package. > > Did you try cmake -U ? > > From the help: > Options > -C <initial-cache> = Pre-load a script to populate the cache. > -D <var>:<type>=<value> = Create a cmake cache entry. > -U <globbing_expr> = Remove matching entries from CMake cache.
Of course that was easy... When you know the actual implementation you can just remove the specific cached value: + + # when you know the implementation: + unset(JAVA_INCLUDE_PATH CACHE) + unset(JAVA_INCLUDE_PATH2 CACHE) + unset(JAVA_AWT_INCLUDE_PATH CACHE) At least I can run my loop now, but this will break next time internal implementation is changed. Thx -- Mathieu _______________________________________________ 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