mirror of
https://github.com/dyne/frei0r.git
synced 2025-12-05 14:19:59 +01:00
`add_custom_command()` has 2 formats: OUTPUT and TARGET. This is TARGET, but TARGET does not permit OUTPUT. see https://cmake.org/cmake/help/v3.31/policy/CMP0175.html and https://cmake.org/cmake/help/v3.31/command/add_custom_command.html Also, I converted to now-prefered lowercase (only lowercase works in my IDE to pull up context-sensitive help for CMake). And I replaced a Make- oriented COMMAND on `add_custom_target()` to a proper `COMMENT`.
35 lines
672 B
CMake
35 lines
672 B
CMake
# 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(
|
|
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)
|
|
|