Skip to content

Commit 0857eac

Browse files
committed
Feat: apply precommit autoupdate
1 parent 6af8df2 commit 0857eac

File tree

4 files changed

+19
-33
lines changed

4 files changed

+19
-33
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ repos:
1313
# This brings in a portable version of clang-format.
1414
# See also: https://github.com/ssciwr/clang-format-wheel
1515
- repo: https://github.com/pre-commit/mirrors-clang-format
16-
rev: v21.1.2
16+
rev: v21.1.6
1717
hooks:
1818
- id: clang-format
1919
types_or: [c++, c]
2020

2121
# CMake linting and formatting
2222
- repo: https://github.com/BlankSpruce/gersemi
23-
rev: 0.22.3
23+
rev: 0.23.1
2424
hooks:
2525
- id: gersemi
2626
name: CMake linting

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
22

3-
cmake_minimum_required(VERSION 3.28...4.1)
3+
cmake_minimum_required(VERSION 3.28...4.2)
44

55
project(
66
beman.scope

infra/cmake/use-fetch-content.cmake

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ message(TRACE "BemanExemplar_projectDir=\"${BemanExemplar_projectDir}\"")
1515

1616
message(TRACE "BEMAN_EXEMPLAR_LOCKFILE=\"${BEMAN_EXEMPLAR_LOCKFILE}\"")
1717
file(
18-
REAL_PATH
19-
"${BEMAN_EXEMPLAR_LOCKFILE}"
18+
REAL_PATH "${BEMAN_EXEMPLAR_LOCKFILE}"
2019
BemanExemplar_lockfile
2120
BASE_DIRECTORY "${BemanExemplar_projectDir}"
2221
EXPAND_TILDE
@@ -38,8 +37,7 @@ function(BemanExemplar_provideDependency method package_name)
3837

3938
# Get the "dependencies" field and store it in BemanExemplar_dependenciesObj
4039
string(
41-
JSON
42-
BemanExemplar_dependenciesObj
40+
JSON BemanExemplar_dependenciesObj
4341
ERROR_VARIABLE BemanExemplar_error
4442
GET "${BemanExemplar_rootObj}"
4543
"dependencies"
@@ -50,8 +48,7 @@ function(BemanExemplar_provideDependency method package_name)
5048

5149
# Get the length of the libraries array and store it in BemanExemplar_dependenciesObj
5250
string(
53-
JSON
54-
BemanExemplar_numDependencies
51+
JSON BemanExemplar_numDependencies
5552
ERROR_VARIABLE BemanExemplar_error
5653
LENGTH "${BemanExemplar_dependenciesObj}"
5754
)
@@ -73,8 +70,7 @@ function(BemanExemplar_provideDependency method package_name)
7370
# Get the dependency object at BemanExemplar_index
7471
# and store it in BemanExemplar_depObj
7572
string(
76-
JSON
77-
BemanExemplar_depObj
73+
JSON BemanExemplar_depObj
7874
ERROR_VARIABLE BemanExemplar_error
7975
GET "${BemanExemplar_dependenciesObj}"
8076
"${BemanExemplar_index}"
@@ -88,8 +84,7 @@ function(BemanExemplar_provideDependency method package_name)
8884

8985
# Get the "name" field and store it in BemanExemplar_name
9086
string(
91-
JSON
92-
BemanExemplar_name
87+
JSON BemanExemplar_name
9388
ERROR_VARIABLE BemanExemplar_error
9489
GET "${BemanExemplar_depObj}"
9590
"name"
@@ -103,8 +98,7 @@ function(BemanExemplar_provideDependency method package_name)
10398

10499
# Get the "package_name" field and store it in BemanExemplar_pkgName
105100
string(
106-
JSON
107-
BemanExemplar_pkgName
101+
JSON BemanExemplar_pkgName
108102
ERROR_VARIABLE BemanExemplar_error
109103
GET "${BemanExemplar_depObj}"
110104
"package_name"
@@ -118,8 +112,7 @@ function(BemanExemplar_provideDependency method package_name)
118112

119113
# Get the "git_repository" field and store it in BemanExemplar_repo
120114
string(
121-
JSON
122-
BemanExemplar_repo
115+
JSON BemanExemplar_repo
123116
ERROR_VARIABLE BemanExemplar_error
124117
GET "${BemanExemplar_depObj}"
125118
"git_repository"
@@ -133,8 +126,7 @@ function(BemanExemplar_provideDependency method package_name)
133126

134127
# Get the "git_tag" field and store it in BemanExemplar_tag
135128
string(
136-
JSON
137-
BemanExemplar_tag
129+
JSON BemanExemplar_tag
138130
ERROR_VARIABLE BemanExemplar_error
139131
GET "${BemanExemplar_depObj}"
140132
"git_tag"
@@ -149,14 +141,12 @@ function(BemanExemplar_provideDependency method package_name)
149141
if(method STREQUAL "FIND_PACKAGE")
150142
if(package_name STREQUAL BemanExemplar_pkgName)
151143
string(
152-
APPEND
153-
BemanExemplar_debug
144+
APPEND BemanExemplar_debug
154145
"Redirecting find_package calls for ${BemanExemplar_pkgName} "
155146
"to FetchContent logic.\n"
156147
)
157148
string(
158-
APPEND
159-
BemanExemplar_debug
149+
APPEND BemanExemplar_debug
160150
"Fetching ${BemanExemplar_repo} at "
161151
"${BemanExemplar_tag} according to ${BemanExemplar_lockfile}."
162152
)

tests/CMakeLists.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,17 @@ include(FetchContent)
55
FetchContent_Declare(
66
Catch2
77
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
8-
GIT_TAG v3.8.0
8+
GIT_TAG v3.11.0
9+
EXCLUDE_FROM_ALL
10+
# FIND_PACKAGE_ARGS 3.11
911
)
1012
FetchContent_MakeAvailable(Catch2)
1113

14+
set(ALL_TESTNAMES scope_success scope_exit scope_fail unique_resource)
15+
1216
# module tests will only compile with gcc15 or clang20 and above
1317
if(CMAKE_CXX_SCAN_FOR_MODULES)
14-
set(ALL_TESTNAMES
15-
scope_success
16-
scope_exit
17-
scope_fail
18-
unique_resource
19-
module
20-
)
21-
else()
22-
set(ALL_TESTNAMES scope_success scope_exit scope_fail unique_resource)
18+
list(APPEND ALL_TESTNAMES module)
2319
endif()
2420

2521
message("Tests to be built: ${ALL_TESTNAMES}")

0 commit comments

Comments
 (0)