Skip to content

Commit 0d3e8a2

Browse files
committed
chore: task format
1 parent c7cf80c commit 0d3e8a2

4 files changed

Lines changed: 33 additions & 28 deletions

File tree

.cmake-format.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1+
format:
2+
line_width: 120
3+
tab_size: 2
4+
max_pargs_hwrap: 3
5+
separate_ctrl_name_with_space: false
6+
separate_fn_name_with_space: false
7+
dangle_parens: false
8+
line_ending: unix
9+
markup:
10+
bullet_char: "*"
11+
enum_char: .
12+
enable_markup: false
113
parse:
214
additional_commands:
315
project_options:
416
pargs:
5-
nargs: '*'
17+
nargs: "*"
618
flags: []
719
spelling: project_options
820
kwargs:
@@ -12,7 +24,7 @@ parse:
1224
CONAN_OPTIONS: +
1325
catch_discover_tests:
1426
pargs:
15-
nargs: '*'
27+
nargs: "*"
1628
flags: []
1729
kwargs:
1830
OUTPUT_DIR: 1
@@ -22,15 +34,15 @@ parse:
2234
TEST_PREFIX: 1
2335
conan_add_remote:
2436
pargs:
25-
nargs: '*'
37+
nargs: "*"
2638
flags: []
2739
kwargs:
2840
INDEX: 1
2941
NAME: 1
3042
URL: 1
3143
conan_cmake_install:
3244
pargs:
33-
nargs: '*'
45+
nargs: "*"
3446
flags: []
3547
kwargs:
3648
BUILD: +
@@ -56,7 +68,7 @@ parse:
5668
SETTINGS_HOST: +
5769
cpmaddpackage:
5870
pargs:
59-
nargs: '*'
71+
nargs: "*"
6072
flags: []
6173
spelling: CPMAddPackage
6274
kwargs: &id001
@@ -85,19 +97,19 @@ parse:
8597
OPTIONS: +
8698
cpmfindpackage:
8799
pargs:
88-
nargs: '*'
100+
nargs: "*"
89101
flags: []
90102
spelling: CPMFindPackage
91103
kwargs: *id001
92104
cpmdeclarepackage:
93105
pargs:
94-
nargs: '*'
106+
nargs: "*"
95107
flags: []
96108
spelling: CPMDeclarePackage
97109
kwargs: *id001
98110
packageproject:
99111
pargs:
100-
nargs: '*'
112+
nargs: "*"
101113
flags: []
102114
spelling: packageProject
103115
kwargs:
@@ -121,15 +133,3 @@ parse:
121133
cpmgetpackageversion:
122134
pargs: 2
123135
spelling: CPMGetPackageVersion
124-
format:
125-
line_width: 120
126-
tab_size: 2
127-
max_pargs_hwrap: 3
128-
separate_ctrl_name_with_space: false
129-
separate_fn_name_with_space: false
130-
dangle_parens: false
131-
line_ending: unix
132-
markup:
133-
bullet_char: '*'
134-
enum_char: .
135-
enable_markup: false

src/StaticAnalyzers.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ endmacro()
2222
macro(enable_clang_tidy)
2323
find_program(CLANGTIDY clang-tidy)
2424
if(CLANGTIDY)
25-
if(NOT CMAKE_CXX_COMPILER_ID MATCHES ".*Clang" AND ${ProjectOptions_ENABLE_PCH})
26-
message(SEND_ERROR "clang-tidy cannot be enabled with non-clang compiler and PCH, clang-tidy fails to handle gcc's PCH file")
25+
if(NOT
26+
CMAKE_CXX_COMPILER_ID
27+
MATCHES
28+
".*Clang"
29+
AND ${ProjectOptions_ENABLE_PCH})
30+
message(
31+
SEND_ERROR
32+
"clang-tidy cannot be enabled with non-clang compiler and PCH, clang-tidy fails to handle gcc's PCH file")
2733
endif()
2834

2935
set(CMAKE_CXX_CLANG_TIDY ${CLANGTIDY} -extra-arg=-Wno-unknown-warning-option)

src/Utilities.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ function(set_env_from_string env_string)
8383
endforeach()
8484
endfunction()
8585

86-
8786
function(get_all_targets var)
8887
set(targets)
8988
get_all_targets_recursive(targets ${CMAKE_CURRENT_SOURCE_DIR})
@@ -107,6 +106,3 @@ macro(get_all_targets_recursive targets dir)
107106
PROPERTY BUILDSYSTEM_TARGETS)
108107
list(APPEND ${targets} ${current_targets})
109108
endmacro()
110-
111-
112-

src/Vcpkg.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ macro(run_vcpkg)
1212
""
1313
${ARGN})
1414

15-
if(NOT "${_vcpkg_args_VCPKG_DIR}" STREQUAL "")
15+
if(NOT
16+
"${_vcpkg_args_VCPKG_DIR}"
17+
STREQUAL
18+
"")
1619
# the installation directory is specified
1720
get_filename_component(VCPKG_PARENT_DIR ${_vcpkg_args_VCPKG_DIR} DIRECTORY)
1821
else()
@@ -27,7 +30,7 @@ macro(run_vcpkg)
2730
endif()
2831

2932
# check if vcpkg is installed
30-
if (WIN32 AND "${CMAKE_EXECUTABLE_SUFFIX}" STREQUAL "")
33+
if(WIN32 AND "${CMAKE_EXECUTABLE_SUFFIX}" STREQUAL "")
3134
set(CMAKE_EXECUTABLE_SUFFIX ".exe")
3235
endif()
3336
if(EXISTS "${_vcpkg_args_VCPKG_DIR}" AND EXISTS "${_vcpkg_args_VCPKG_DIR}/vcpkg${CMAKE_EXECUTABLE_SUFFIX}")

0 commit comments

Comments
 (0)