servatrice/cmakeify.sh
Zach H a95b338c80
Add cmake format (#4618)
* Support CMakeify operation

* Run Cmakeify

* Update cmakeify.sh

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-05-08 21:22:43 +02:00

14 lines
437 B
Bash
Executable file

#!/bin/bash
# go to the project root directory, this file should be located in the project root directory
cd "${BASH_SOURCE%/*}/" || exit 2 # could not find path, this could happen with special links etc.
# CMake-Format
cmake_format_cmd="cmake-format"
if ! hash $cmake_format_cmd 2>/dev/null; then
echo "could not find $cmake_format_cmd, skipping" >&2
return
fi
$cmake_format_cmd -i cmake/*.cmake */CMakeLists.txt CMakeLists.txt