summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-11 11:58:28 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-11 11:58:28 +0100
commita21a93a815c3916c1862d2b09f1589a7505dde07 (patch)
tree0df509fc08a6c5d7005799c4a0d111455bc0626a /CMakeLists.txt
parent4f9d823dda1be41632f1a2fb296577a2f3bf010b (diff)
downloadsink-a21a93a815c3916c1862d2b09f1589a7505dde07.tar.gz
sink-a21a93a815c3916c1862d2b09f1589a7505dde07.zip
Added a format target
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0bbd9f3..99d7a41 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,16 @@ include(KDEInstallDirs)
21find_package(Qt5 COMPONENTS REQUIRED Core Widgets Network) 21find_package(Qt5 COMPONENTS REQUIRED Core Widgets Network)
22find_package(KF5 COMPONENTS REQUIRED Async) 22find_package(KF5 COMPONENTS REQUIRED Async)
23find_package(FlatBuffers REQUIRED) 23find_package(FlatBuffers REQUIRED)
24
25#Clang-format support
26add_custom_command(
27 OUTPUT format.dummy
28 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
29 COMMAND clang-format -i ${CMAKE_SOURCE_DIR}/**.{cpp,h}
30)
31add_custom_target(format DEPENDS format.dummy)
32
33#Generate flatbuffer bindings
24if (${AVOID_BINDING_REBUILD}) 34if (${AVOID_BINDING_REBUILD})
25 add_custom_target(generate_bindings) 35 add_custom_target(generate_bindings)
26else() 36else()
@@ -42,6 +52,7 @@ function(generate_flatbuffers _target)
42 endforeach(fbs) 52 endforeach(fbs)
43endfunction(generate_flatbuffers) 53endfunction(generate_flatbuffers)
44 54
55#Clang-analyze support
45add_custom_target(analyze) 56add_custom_target(analyze)
46function(add_clang_static_analysis target) 57function(add_clang_static_analysis target)
47 get_target_property(SRCs ${target} SOURCES) 58 get_target_property(SRCs ${target} SOURCES)