diff --git a/tools/port-cmake-style.sh b/tools/port-cmake-style.sh new file mode 100644 index 000000000..c87543a94 --- /dev/null +++ b/tools/port-cmake-style.sh @@ -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