diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-11 11:58:28 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-11 11:58:28 +0100 |
commit | a21a93a815c3916c1862d2b09f1589a7505dde07 (patch) | |
tree | 0df509fc08a6c5d7005799c4a0d111455bc0626a /CMakeLists.txt | |
parent | 4f9d823dda1be41632f1a2fb296577a2f3bf010b (diff) | |
download | sink-a21a93a815c3916c1862d2b09f1589a7505dde07.tar.gz sink-a21a93a815c3916c1862d2b09f1589a7505dde07.zip |
Added a format target
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
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) | |||
21 | find_package(Qt5 COMPONENTS REQUIRED Core Widgets Network) | 21 | find_package(Qt5 COMPONENTS REQUIRED Core Widgets Network) |
22 | find_package(KF5 COMPONENTS REQUIRED Async) | 22 | find_package(KF5 COMPONENTS REQUIRED Async) |
23 | find_package(FlatBuffers REQUIRED) | 23 | find_package(FlatBuffers REQUIRED) |
24 | |||
25 | #Clang-format support | ||
26 | add_custom_command( | ||
27 | OUTPUT format.dummy | ||
28 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
29 | COMMAND clang-format -i ${CMAKE_SOURCE_DIR}/**.{cpp,h} | ||
30 | ) | ||
31 | add_custom_target(format DEPENDS format.dummy) | ||
32 | |||
33 | #Generate flatbuffer bindings | ||
24 | if (${AVOID_BINDING_REBUILD}) | 34 | if (${AVOID_BINDING_REBUILD}) |
25 | add_custom_target(generate_bindings) | 35 | add_custom_target(generate_bindings) |
26 | else() | 36 | else() |
@@ -42,6 +52,7 @@ function(generate_flatbuffers _target) | |||
42 | endforeach(fbs) | 52 | endforeach(fbs) |
43 | endfunction(generate_flatbuffers) | 53 | endfunction(generate_flatbuffers) |
44 | 54 | ||
55 | #Clang-analyze support | ||
45 | add_custom_target(analyze) | 56 | add_custom_target(analyze) |
46 | function(add_clang_static_analysis target) | 57 | function(add_clang_static_analysis target) |
47 | get_target_property(SRCs ${target} SOURCES) | 58 | get_target_property(SRCs ${target} SOURCES) |