build FEATURE new 'format' and 'format-check' make targets
To format source codes (tools are not covered for now) using uncrustify.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60e209b..41e017a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@
include(CheckSymbolExists)
include(UseCompat)
include(ABICheck)
+include(SourceFormat)
set(LIBYANG_DESCRIPTION "libyang is YANG data modelling language parser and toolkit written (and providing API) in C.")
@@ -300,6 +301,9 @@
libyang_abicheck()
endif()
+# source code format
+source_format(src/* compat/*)
+
# clean cmake cache
add_custom_target(cclean
COMMAND make clean