aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindClangFormat.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindClangFormat.cmake')
-rw-r--r--cmake/modules/FindClangFormat.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/modules/FindClangFormat.cmake b/cmake/modules/FindClangFormat.cmake
new file mode 100644
index 0000000000..7220d31623
--- /dev/null
+++ b/cmake/modules/FindClangFormat.cmake
@@ -0,0 +1,11 @@
+#.rst:
+# FindClangFormat
+# ----------
+# Finds clang-format
+
+find_program(CLANG_FORMAT_EXECUTABLE clang-format)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(ClangFormat REQUIRED_VARS CLANG_FORMAT_EXECUTABLE)
+
+mark_as_advanced(CLANG_FORMAT_EXECUTABLE)