Skip to content
Snippets Groups Projects
Commit 8ab0da84 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

CMake: add `make distclean`

I tired to type git clean blabla each time.
parent 2afdac92
No related branches found
No related tags found
No related merge requests found
......@@ -419,6 +419,22 @@ add_subdirectory(extra)
add_subdirectory(test)
add_subdirectory(doc)
if(NOT "${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
add_custom_target(distclean)
add_custom_command(TARGET distclean
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PROJECT_BINARY_DIR}"
COMMENT "Removing the build directory and its content"
)
elseif(IS_DIRECTORY .git AND GIT)
add_custom_target(distclean)
add_custom_command(TARGET distclean
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND ${GIT} submodule foreach --recursive git clean -f -X -d
COMMAND ${GIT} clean -f -X -d
COMMENT "Removing all build files from the source directory"
)
endif()
#
# tarantool info summary (used in server version output)
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment