Add cmake format (#4618)

* Support CMakeify operation

* Run Cmakeify

* Update cmakeify.sh

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
Zach H 2022-05-08 15:22:43 -04:00 committed by GitHub
parent 3e90f109a2
commit a95b338c80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1132 additions and 815 deletions

14
cmakeify.sh Executable file
View file

@ -0,0 +1,14 @@
#!/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