aboutsummaryrefslogtreecommitdiff
path: root/drive-sdk/cmake/modules/TargetDistclean.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'drive-sdk/cmake/modules/TargetDistclean.cmake')
-rw-r--r--drive-sdk/cmake/modules/TargetDistclean.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/drive-sdk/cmake/modules/TargetDistclean.cmake b/drive-sdk/cmake/modules/TargetDistclean.cmake
new file mode 100644
index 0000000..ddd738c
--- /dev/null
+++ b/drive-sdk/cmake/modules/TargetDistclean.cmake
@@ -0,0 +1,28 @@
+# http://www.cmake.org/pipermail/cmake/2003-June/003953.html
+# add custom target distclean
+# cleans and removes cmake generated files etc.
+# Jan Woetzel 04/2003
+#
+
+IF (UNIX)
+ ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
+ SET(DISTCLEANED
+ cmake.depends
+ cmake.check_depends
+ CMakeCache.txt
+ cmake.check_cache
+ *.cmake
+ Makefile
+ core core.*
+ gmon.out
+ *~
+ )
+
+ ADD_CUSTOM_COMMAND(
+ DEPENDS clean
+ COMMENT "distribution clean"
+ COMMAND rm
+ ARGS -Rf CMakeTmp ${DISTCLEANED}
+ TARGET distclean
+ )
+ENDIF(UNIX)