[CMake] some helper targets ?

William A. Hoffman billlist at nycap.rr.com
Sat Apr 8 11:33:33 EDT 2006


At 09:28 AM 4/8/2006, Axel Roebel wrote:

>> Hi,
>>
>> maybe they exist already, what I'd like to have is
>>
>> -a target which forces cmake to rerun on all files, so that all cmake
>> files are executed again, but without the system checks
>> (e.g. our KDE4_AUTOMOC macro is executed only on cmake time, so it
>> wouldn't detect if such a special include is inserted into a source file
>> later on)
>> -a target which does the above and additionally reruns all checks
>> (find_foo(), try_compile(), ...)
>>
>> Is this possible ?
>
>How about
>
># helper target to remove cache
>ADD_CUSTOM_TARGET(cmclean ${CMAKE_COMMAND} -E remove
>${CMAKE_CACHEFILE_DIR}/CMakeCache.txt
>${CMAKE_CACHEFILE_DIR}/CMakeFiles/CMakeSystem.cmake
>${CMAKE_CACHEFILE_DIR}/CMakeFiles/CMakeCXXCompiler.cmake
>${CMAKE_CACHEFILE_DIR}/CMakeFiles/CMakeCCompiler.cmake)

In cvs cmake, if the CMakeCache.txt gets removed, the next time
cmake is run, all the files in CMakeFIles/*.cmake will be removed,
so you only need to remove the CMakeCache.txt.

-Bill



More information about the CMake mailing list