Add a tool to follow KDE cmake coding style with regard to end commands

Removes the predicate from all of them, especially on else it was very
annoying.

http://techbase.kde.org/Policies/CMake_Coding_Style#End_commands
This commit is contained in:
Aleix Pol 2013-11-14 17:22:26 +01:00
parent d56f690fcf
commit 19d6fab067

View File

@ -0,0 +1,6 @@
for FS in `find $PWD -type f -name 'CMakeLists.txt'`; do
#removes the predicate of endif and else in cmake
# http://techbase.kde.org/Policies/CMake_Coding_Style#End_commands
perl -p -i -e 's/endif( *)\(.*\)/endif\1()/g' $FS
perl -p -i -e 's/else( *)\(.*\)/else\1()/g' $FS
done