aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kde-modules/KDEClangFormat.cmake2
-rw-r--r--kde-modules/KDEFrameworkCompilerLegacySettings.cmake2
-rw-r--r--kde-modules/KDEFrameworkCompilerSettings.cmake2
-rwxr-xr-xkde-modules/kde-git-commit-hooks/clang-format.sh2
4 files changed, 4 insertions, 4 deletions
diff --git a/kde-modules/KDEClangFormat.cmake b/kde-modules/KDEClangFormat.cmake
index 5adba5e9..46be8ad6 100644
--- a/kde-modules/KDEClangFormat.cmake
+++ b/kde-modules/KDEClangFormat.cmake
@@ -35,7 +35,7 @@ Example usage:
.. code-block:: cmake
include(KDEClangFormat)
- file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
+ file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.hpp *.c)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
To exclude directories from the formatting add a ``.clang-format``
diff --git a/kde-modules/KDEFrameworkCompilerLegacySettings.cmake b/kde-modules/KDEFrameworkCompilerLegacySettings.cmake
index 192d079b..895291c0 100644
--- a/kde-modules/KDEFrameworkCompilerLegacySettings.cmake
+++ b/kde-modules/KDEFrameworkCompilerLegacySettings.cmake
@@ -76,6 +76,6 @@ endif()
if (ECM_GLOBAL_FIND_VERSION VERSION_GREATER_EQUAL 5.80.0)
include(KDEClangFormat)
# add clang-format target
- file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
+ file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.hpp *.c)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
endif ()
diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake
index 3eb640ef..fa31a93b 100644
--- a/kde-modules/KDEFrameworkCompilerSettings.cmake
+++ b/kde-modules/KDEFrameworkCompilerSettings.cmake
@@ -64,7 +64,7 @@ add_definitions(
# add clang-format target
include(KDEClangFormat)
-file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
+file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.hpp *.c)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
# add the metainfo platform check
diff --git a/kde-modules/kde-git-commit-hooks/clang-format.sh b/kde-modules/kde-git-commit-hooks/clang-format.sh
index 42a16a1d..c8bf7565 100755
--- a/kde-modules/kde-git-commit-hooks/clang-format.sh
+++ b/kde-modules/kde-git-commit-hooks/clang-format.sh
@@ -2,7 +2,7 @@
# Based on okular/hooks/pre-commit, credits go to Albert Astals Cid
-readonly output=$(git clang-format -v --diff)
+readonly output=$(git clang-format --extensions ".cpp, .h, .hpp, .c" -v --diff)
if [[ ! -f .clang-format ]]; then
echo "ERROR: no .clang-format file found in repository root, abort format"