Previously CMake block termination commands were required to have arguments
matching the command starting the block. This is no longer necessary and not
the preferred style. This type of change has been implemented in other open
source projects such as: ITK, vxl, and BRAINSTools. It is the preferred style
for KDE. Consistent style practices help improve readability and
maintainability of code.
This was implemented with the shell script:
NOTE: MUST USE GNU compliant version of sed
in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed \
&& git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' \
| xargs -0 gsed -i -f convert.sed \
&& rm convert.sed
This is a reimplementation of ITK commit
e52dbe7fa476f6283c9b9d1507fca052355113a4
Fixes #585
23 lines
858 B
CMake
23 lines
858 B
CMake
# add custom target distclean
|
|
# cleans and removes cmake generated files etc.
|
|
# Jan Woetzel 04/2003
|
|
#
|
|
|
|
# taken from http://cmake.org/pipermail/cmake/2003-June/003953.html
|
|
# hate at http://itk.org/Bug/view.php?id=6647
|
|
# yacked and brought out of 2003 by rcurtin
|
|
|
|
if (UNIX)
|
|
# since it's unix-specific we will use bash
|
|
add_custom_target (distclean @echo cleaning ${FASTLIB_SOURCE_DIR} for source distribution)
|
|
|
|
add_custom_command(TARGET distclean
|
|
COMMAND make ARGS clean
|
|
COMMAND find ARGS ${FASTLIB_SOURCE_DIR} -iname CMakeCache.txt -delete
|
|
COMMAND find ARGS ${FASTLIB_SOURCE_DIR} -iname cmake_install.cmake -delete
|
|
COMMAND find ARGS ${FASTLIB_SOURCE_DIR} -iname Makefile -delete
|
|
COMMAND find ARGS ${FASTLIB_SOURCE_DIR} -depth -type d -iname CMakeFiles -exec rm -rf {} \;
|
|
COMMAND rm ARGS -rf bin lib include
|
|
VERBATIM )
|
|
endif()
|