[CMake] some helper targets ?
Axel Roebel
Axel.Roebel at ircam.fr
Sat Apr 8 09:28:16 EDT 2006
> 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)
# helper target to remove reinit from scratch
ADD_CUSTOM_TARGET(reinit ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR})
ADD_DEPENDENCIES(reinit cmclean)
Now with this rebuild_cache would rebuild the cache
without tests and reinit will rebuild the cache from scratch.
Me too, I think this would be nice to have as default.
And those two I find usefull as well to switch
build type via the makefiles
ADD_CUSTOM_TARGET(set_debug ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE:STRING=debug ${CMAKE_CURRENT_SOURCE_DIR})
ADD_CUSTOM_TARGET(set_release ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE:STRING=release ${CMAKE_CURRENT_SOURCE_DIR})
By the way it would be nice if one could have a doc string for targets
because users that did not create the CMakeList.txt
don't understand the different targets that might be available.
Axel
> Bye
> Alex
>
>
> --
> Echte DSL-Flatrate dauerhaft für 0,- Euro*!
> "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>
--
Axel Roebel
IRCAM Analysis/Synthesis Team
Email: Axel.Roebel at ircam.fr | Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540
More information about the CMake
mailing list