Commit d943a160 authored by David Edmundson's avatar David Edmundson
Browse files

Add KDEClangFormat cmake support

Summary:
This allows devs to run: "make clang-format" and format all files easily
using the preset KDE clang format style

This patch adds support so devs can easily test the intended formatting
now, it doesn't change the code yet.

Doing an initial run to commit everything will happen later.

Test Plan:
Ran script
git diff was full of amazingly cleaned code

See D25134
parent 0b8ef770
......@@ -21,6 +21,7 @@ include(ECMOptionalAddSubdirectory)
include(ECMQtDeclareLoggingCategory)
include(FeatureSummary)
include(CheckIncludeFiles)
include(KDEClangFormat)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Quick
......@@ -182,4 +183,8 @@ if(X11_Xkb_FOUND AND XCB_XKB_FOUND)
endif()
install(FILES org.kde.plasmashell.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment