Skip to content

Commit

Permalink
More thorough distclean.
Browse files Browse the repository at this point in the history
  • Loading branch information
GUI committed May 13, 2016
1 parent 381ee94 commit 58d915b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ include(${CMAKE_SOURCE_DIR}/build/cmake/package.cmake)
# Clean Task
#
include(${CMAKE_SOURCE_DIR}/build/cmake/clean-download-archives.cmake)
add_custom_target(
distclean
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/build/cmake/distclean.cmake
)
include(${CMAKE_SOURCE_DIR}/build/cmake/distclean.cmake)

#
# Outdated Dependencies Check
Expand Down
13 changes: 3 additions & 10 deletions build/cmake/distclean.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
FILE(REMOVE_RECURSE
build/package/.bundle
build/package/vendor
build/scripts/.bundle
build/scripts/vendor
build/work
cmake_install.cmake
CMakeCache.txt
CMakeFiles
test/node_modules
add_custom_target(
distclean
COMMAND ${CMAKE_SOURCE_DIR}/build/scripts/distclean
)
27 changes: 27 additions & 0 deletions build/scripts/distclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -e -u -x

SOURCE_DIR="$(dirname $(dirname $(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)))"

if [ ! -f $SOURCE_DIR/CMakeLists.txt ]; then
echo "Can't find root source directory"
exit 1
fi

rm -rf $SOURCE_DIR/CMakeCache.txt \
$SOURCE_DIR/CMakeFiles \
$SOURCE_DIR/Makefile \
$SOURCE_DIR/build/package/.bundle \
$SOURCE_DIR/build/package/vendor \
$SOURCE_DIR/build/scripts/.bundle \
$SOURCE_DIR/build/scripts/vendor \
$SOURCE_DIR/build/work \
$SOURCE_DIR/cmake_install.cmake \
$SOURCE_DIR/install_manifest.txt \
$SOURCE_DIR/src/api-umbrella/hadoop-analytics/*/dependency-reduced-pom.xml \
$SOURCE_DIR/src/api-umbrella/web-app/log \
$SOURCE_DIR/src/api-umbrella/web-app/tmp/* \
$SOURCE_DIR/test/config/.overrides.yml \
$SOURCE_DIR/test/node_modules \
$SOURCE_DIR/test/tmp/*

0 comments on commit 58d915b

Please sign in to comment.