mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-28 01:27:09 +03:00
build: add cmake support
This commit is contained in:
1 parent
357a0f6b7a
commit
e191e2d726
11 files changed
+1034
-4
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
cmakeFormat="cmake-format"
|
||||
|
||||
path_to_cmake_format="$(which $cmakeFormat)"
|
||||
echo "$path_to_cmake_format"
|
||||
|
||||
if [ -z "$cmakeFormat" ]
|
||||
then
|
||||
echo "$cmakeFormat is not installed. Cannot format cmake files..."
|
||||
echo "run: pip install cmake-format"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$cmakeFormat was found, going to format your cmake scripts..." >&2
|
||||
|
||||
find $(dirname "$0")/ \
|
||||
-not \( -path "*/build/*" -prune \) \
|
||||
\( -name *.cmake -o -name CMakeLists.txt \) \
|
||||
| xargs $cmakeFormat -c cmake-format.yaml -i
|
||||
|
||||
|
||||
echo "done formatting with cmake-format"
|
||||
Reference in new issue
Block a user