diff options
| author | Bryce Harrington <bryce@bryceharrington.org> | 2016-01-17 21:54:51 +0000 |
|---|---|---|
| committer | bryce <bryce@bryceharrington.org> | 2016-01-17 21:54:51 +0000 |
| commit | 666582ac8ca0aebbbd20c629311f2ac2116bc979 (patch) | |
| tree | 900aef2469e37e5664ce77ef49ebbeb8a5ee896c | |
| parent | README: Add some basic cmake directions (diff) | |
| download | inkscape-666582ac8ca0aebbbd20c629311f2ac2116bc979.tar.gz inkscape-666582ac8ca0aebbbd20c629311f2ac2116bc979.zip | |
cmake: Add cleanup targets clean-cmake-files and clean-all
These are woefully incomplete but they at least get rid of the top level
cmake cruft. Further work will be needed to locate and remove all the
various generated cmake files.
For now, best practice is to use a parallel build, that can be
recursively deleted when needing to start fresh.
(bzr r14608)
| -rw-r--r-- | CMakeLists.txt | 12 | ||||
| -rw-r--r-- | CMakeScripts/CleanAll.cmake | 17 |
2 files changed, 29 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fdbb5cb60..de091a495 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,6 +191,18 @@ else() # TODO, WIN32, APPLE/OSX, MinGW endif() +# ----------------------------------------------------------------------------- +# Clean +# ----------------------------------------------------------------------------- +add_custom_target(clean-cmake-files + COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_SOURCE_DIR}/CMakeScripts/CleanAll.cmake" +) + +add_custom_target(clean-all + COMMAND ${CMAKE_BUILD_TOOL} clean + COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_SOURCE_DIR}/CMakeScripts/CleanAll.cmake" +) + #----------------------------------------------------------------------------- add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) diff --git a/CMakeScripts/CleanAll.cmake b/CMakeScripts/CleanAll.cmake new file mode 100644 index 000000000..0b04d188f --- /dev/null +++ b/CMakeScripts/CleanAll.cmake @@ -0,0 +1,17 @@ +set(_generated + ${CMAKE_CURRENT_BINARY_DIR}/CMakeCache.txt + ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake + ${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake + ${CMAKE_CURRENT_BINARY_DIR}/po/cmake_install.cmake + ${CMAKE_CURRENT_BINARY_DIR}/Makefile + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles +) + +message("${_generated}") + +foreach(file ${_generated}) + if(EXISTS ${file}) + message("Removing ${file}") + file(REMOVE_RECURSE ${file}) + endif() +endforeach(file) |
