Skip to content

Commit 4491de8

Browse files
committed
Add linebreak for multiline CMake statements
1 parent 2f3ef18 commit 4491de8

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

.cmake-format.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ format:
7070
_help_dangle_parens:
7171
- If a statement is wrapped to more than one line, than dangle
7272
- the closing parenthesis on its own line.
73-
dangle_parens: false
73+
dangle_parens: true
7474
_help_dangle_align:
7575
- If the trailing parenthesis must be 'dangled' on its on
7676
- 'line, then align it to this reference: `prefix`: the start'

CMakeLists.txt

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ project(
1111
DESCRIPTION
1212
"Edgerunner is a cross-platform ML inference library for mobile devices"
1313
HOMEPAGE_URL "https://runlocal.ai"
14-
LANGUAGES CXX)
14+
LANGUAGES CXX
15+
)
1516

1617
include(cmake/project-is-top-level.cmake)
1718
include(cmake/variables.cmake)
1819

1920
# ---- Declare library ----
2021

21-
add_library(edgerunner_edgerunner source/edgerunner.cpp source/tflite/model.cpp
22-
source/tflite/tensor.cpp)
22+
add_library(
23+
edgerunner_edgerunner source/edgerunner.cpp source/tflite/model.cpp
24+
source/tflite/tensor.cpp
25+
)
2326
add_library(edgerunner::edgerunner ALIAS edgerunner_edgerunner)
2427

2528
include(GenerateExportHeader)
@@ -30,11 +33,13 @@ generate_export_header(
3033
EXPORT_FILE_NAME
3134
export/edgerunner/edgerunner_export.hpp
3235
CUSTOM_CONTENT_FROM_VARIABLE
33-
pragma_suppress_c4251)
36+
pragma_suppress_c4251
37+
)
3438

3539
if(NOT BUILD_SHARED_LIBS)
36-
target_compile_definitions(edgerunner_edgerunner
37-
PUBLIC EDGERUNNER_STATIC_DEFINE)
40+
target_compile_definitions(
41+
edgerunner_edgerunner PUBLIC EDGERUNNER_STATIC_DEFINE
42+
)
3843
endif()
3944

4045
set_target_properties(
@@ -44,15 +49,18 @@ set_target_properties(
4449
VERSION "${PROJECT_VERSION}"
4550
SOVERSION "${PROJECT_VERSION_MAJOR}"
4651
EXPORT_NAME edgerunner
47-
OUTPUT_NAME edgerunner)
52+
OUTPUT_NAME edgerunner
53+
)
4854

4955
target_include_directories(
5056
edgerunner_edgerunner ${warning_guard}
51-
PUBLIC "\$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>")
57+
PUBLIC "\$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
58+
)
5259

5360
target_include_directories(
5461
edgerunner_edgerunner SYSTEM
55-
PUBLIC "\$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/export>")
62+
PUBLIC "\$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/export>"
63+
)
5664

5765
target_compile_features(edgerunner_edgerunner PUBLIC cxx_std_17)
5866

@@ -72,7 +80,8 @@ if(ANDROID AND edgerunner_ENABLE_NPU)
7280
target_compile_definitions(edgerunner_edgerunner PUBLIC EDGERUNNER_QNN)
7381

7482
file(COPY "${CMAKE_BINARY_DIR}/../runtimeLibs/"
75-
DESTINATION ${CMAKE_BINARY_DIR})
83+
DESTINATION ${CMAKE_BINARY_DIR}
84+
)
7685
endif()
7786

7887
if(edgerunner_ENABLE_GPU)

0 commit comments

Comments
 (0)