File: TargetDistclean.cmake

package info (click to toggle)
frei0r 2.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,936 kB
  • sloc: ansic: 177,957; cpp: 7,881; xml: 50; makefile: 36
file content (35 lines) | stat: -rw-r--r-- 688 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# add custom target distclean
# cleans and removes cmake generated files etc.
# Jan Woetzel 04/2003
#

if(UNIX)
  add_custom_target(distclean
     COMMENT "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(
     POST_BUILD
     COMMENT "running target clean"
     TARGET distclean
     COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean
  )
  add_custom_command(
    POST_BUILD
    COMMENT "distribution clean"
    COMMAND rm
    ARGS    -Rf CMakeTmp ${DISTCLEANED}
    TARGET  distclean
  )
endif(UNIX)