Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ repos:
# This brings in a portable version of clang-format.
# See also: https://github.com/ssciwr/clang-format-wheel
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v21.1.2
rev: v21.1.5
hooks:
- id: clang-format
types_or: [c++, c]

# CMake linting and formatting
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.22.3
rev: 0.23.1
hooks:
- id: gersemi
name: CMake linting
Expand Down
30 changes: 10 additions & 20 deletions infra/cmake/use-fetch-content.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ message(TRACE "BemanExemplar_projectDir=\"${BemanExemplar_projectDir}\"")

message(TRACE "BEMAN_EXEMPLAR_LOCKFILE=\"${BEMAN_EXEMPLAR_LOCKFILE}\"")
file(
REAL_PATH
"${BEMAN_EXEMPLAR_LOCKFILE}"
REAL_PATH "${BEMAN_EXEMPLAR_LOCKFILE}"
BemanExemplar_lockfile
BASE_DIRECTORY "${BemanExemplar_projectDir}"
EXPAND_TILDE
Expand All @@ -38,8 +37,7 @@ function(BemanExemplar_provideDependency method package_name)

# Get the "dependencies" field and store it in BemanExemplar_dependenciesObj
string(
JSON
BemanExemplar_dependenciesObj
JSON BemanExemplar_dependenciesObj
ERROR_VARIABLE BemanExemplar_error
GET "${BemanExemplar_rootObj}"
"dependencies"
Expand All @@ -50,8 +48,7 @@ function(BemanExemplar_provideDependency method package_name)

# Get the length of the libraries array and store it in BemanExemplar_dependenciesObj
string(
JSON
BemanExemplar_numDependencies
JSON BemanExemplar_numDependencies
ERROR_VARIABLE BemanExemplar_error
LENGTH "${BemanExemplar_dependenciesObj}"
)
Expand All @@ -73,8 +70,7 @@ function(BemanExemplar_provideDependency method package_name)
# Get the dependency object at BemanExemplar_index
# and store it in BemanExemplar_depObj
string(
JSON
BemanExemplar_depObj
JSON BemanExemplar_depObj
ERROR_VARIABLE BemanExemplar_error
GET "${BemanExemplar_dependenciesObj}"
"${BemanExemplar_index}"
Expand All @@ -88,8 +84,7 @@ function(BemanExemplar_provideDependency method package_name)

# Get the "name" field and store it in BemanExemplar_name
string(
JSON
BemanExemplar_name
JSON BemanExemplar_name
ERROR_VARIABLE BemanExemplar_error
GET "${BemanExemplar_depObj}"
"name"
Expand All @@ -103,8 +98,7 @@ function(BemanExemplar_provideDependency method package_name)

# Get the "package_name" field and store it in BemanExemplar_pkgName
string(
JSON
BemanExemplar_pkgName
JSON BemanExemplar_pkgName
ERROR_VARIABLE BemanExemplar_error
GET "${BemanExemplar_depObj}"
"package_name"
Expand All @@ -118,8 +112,7 @@ function(BemanExemplar_provideDependency method package_name)

# Get the "git_repository" field and store it in BemanExemplar_repo
string(
JSON
BemanExemplar_repo
JSON BemanExemplar_repo
ERROR_VARIABLE BemanExemplar_error
GET "${BemanExemplar_depObj}"
"git_repository"
Expand All @@ -133,8 +126,7 @@ function(BemanExemplar_provideDependency method package_name)

# Get the "git_tag" field and store it in BemanExemplar_tag
string(
JSON
BemanExemplar_tag
JSON BemanExemplar_tag
ERROR_VARIABLE BemanExemplar_error
GET "${BemanExemplar_depObj}"
"git_tag"
Expand All @@ -149,14 +141,12 @@ function(BemanExemplar_provideDependency method package_name)
if(method STREQUAL "FIND_PACKAGE")
if(package_name STREQUAL BemanExemplar_pkgName)
string(
APPEND
BemanExemplar_debug
APPEND BemanExemplar_debug
"Redirecting find_package calls for ${BemanExemplar_pkgName} "
"to FetchContent logic.\n"
)
string(
APPEND
BemanExemplar_debug
APPEND BemanExemplar_debug
"Fetching ${BemanExemplar_repo} at "
"${BemanExemplar_tag} according to ${BemanExemplar_lockfile}."
)
Expand Down
Loading