From 02d78b2f328ca0671f8bd84f03b61985786ba1fd Mon Sep 17 00:00:00 2001 From: Tobias Fella <fella@posteo.de> Date: Thu, 4 Nov 2021 19:51:06 +0100 Subject: [PATCH] Don't try to use clang-format on android at all --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36359a08..3116316f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,11 +24,12 @@ include(ECMSetupVersion) include(ECMQtDeclareLoggingCategory) include(ECMGenerateExportHeader) include(KDEInstallDirs) -include(KDEClangFormat) include(KDEGitCommitHooks) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) - +if(NOT ANDROID) + include(KDEClangFormat) +endif() ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX KASTS @@ -73,10 +74,10 @@ add_subdirectory(src) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) -file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h) -kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) if (NOT ANDROID) # inside if-statement to work around problems with gitlab Android CI + file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h) + kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) endif()