• Julien Malik's avatar
    STYLE: Remove CMake-language block-end arguments · e84f23c4
    Julien Malik authored
    Ancient versions of CMake required else(), endif(), and similar block
    termination commands to have arguments matching the command starting the
    block.  This is no longer the preferred style.
    NOTE: MUST USE GNU compliant version of sed
    Run the following shell code (Adopted from Brad King scripts for CMake):
    for c 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 sed -i -f convert.sed \
    && rm convert.sed
    This has been adapted from ITK commit e52dbe7fa476f6283c9b9d1507fca052355113a4
FindMercurial.cmake 2.32 KB