Commit 17801dd3 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 a87f3be6
......@@ -9,6 +9,7 @@ set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/mod
include(CheckFunctionExists)
include(KDEInstallDirs)
include(KDEClangFormat)
find_package(PAM REQUIRED)
find_package(LibGcrypt 1.5.0 REQUIRED)
......@@ -75,6 +76,10 @@ target_link_libraries (${library_name}
${LIBGCRYPT_LIBRARIES}
)
# 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})
install(TARGETS ${library_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}/security)
configure_file(pam_kwallet_init.desktop.cmake ${CMAKE_BINARY_DIR}/pam_kwallet_init.desktop)
......
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