From 5d5c3437b9f1db689298721a61444e5dbf911701 Mon Sep 17 00:00:00 2001 From: Edward Nolan Date: Sun, 26 Apr 2026 21:29:15 -0400 Subject: [PATCH] Exemplar updates since 2026-04-05 Bump infra-workflows from 1.5.0 to 1.5.1 in all GitHub Actions workflow files. Bump infra-workflows version from 1.5.1 to 1.5.2 in all GitHub Actions workflow files (fixes deprecated Node.js v20 actions). Add build telemetry support: include BuildTelemetryConfig.cmake and call configure_build_telemetry() in CMakeLists.txt; update infra to commit dfdb103 (adds BuildTelemetry.cmake, BuildTelemetryConfig.cmake, telemetry.sh; updates beman-install-library.cmake, Config.cmake.in, use-fetch-content.cmake, .pre-commit-config.yaml, README.md). Bump infra-workflows version from 1.5.2 to 1.5.3 in all GitHub Actions workflow files. Remove explicit args from beman-tidy pre-commit hook to use defaults instead of ["." "--verbose" "--require-all"]. Split Clang 18/17 CI matrix entry into separate entries, restoring Clang 18 + libstdc++ + c++23 test (exemplar 26982cd907aa137d046ed536dd1b2db4fbc16f03) b1e7015b1bd62ce5b20009cec7ee98ba5c783818: Remove beman-tidy pre-commit hook from .pre-commit-config.yaml --- .exemplar_version | 2 +- .github/workflows/ci_tests.yml | 20 +++- .github/workflows/pre-commit-check.yml | 2 +- .github/workflows/pre-commit-update.yml | 2 +- .pre-commit-config.yaml | 6 -- CMakeLists.txt | 4 +- README.md | 6 +- infra/.beman_submodule | 2 +- infra/.pre-commit-config.yaml | 6 +- infra/README.md | 34 +++++++ infra/cmake/BuildTelemetry.cmake | 4 + infra/cmake/BuildTelemetryConfig.cmake | 58 ++++++++++++ infra/cmake/Config.cmake.in | 6 +- infra/cmake/beman-install-library.cmake | 38 ++++---- infra/cmake/telemetry.sh | 118 ++++++++++++++++++++++++ infra/cmake/use-fetch-content.cmake | 33 +++---- 16 files changed, 276 insertions(+), 65 deletions(-) create mode 100755 infra/cmake/BuildTelemetry.cmake create mode 100755 infra/cmake/BuildTelemetryConfig.cmake create mode 100755 infra/cmake/telemetry.sh diff --git a/.exemplar_version b/.exemplar_version index c45b836..5223332 100644 --- a/.exemplar_version +++ b/.exemplar_version @@ -1 +1 @@ -f5759898e1ac110fc070791b83267f13c9b50b4c +b1e7015b1bd62ce5b20009cec7ee98ba5c783818 diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 814a368..42a6b3f 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -13,10 +13,10 @@ on: jobs: beman-submodule-check: - uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.5.0 + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.5.3 preset-test: - uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.5.0 + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.5.3 with: matrix_config: > [ @@ -31,7 +31,7 @@ jobs: ] build-and-test: - uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.5.0 + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.5.3 with: matrix_config: > { @@ -105,7 +105,17 @@ jobs: } ] }, - { "versions": ["18", "17"], + { "versions": ["18"], + "tests": [ + { "cxxversions": ["c++26", "c++23", "c++20"], + "tests": [{"stdlibs": ["libc++"], "tests": ["Release.Default"]}] + }, + { "cxxversions": ["c++23", "c++20"], + "tests": [{"stdlibs": ["libstdc++"], "tests": ["Release.Default"]}] + } + ] + }, + { "versions": ["17"], "tests": [ { "cxxversions": ["c++26", "c++23", "c++20"], "tests": [{"stdlibs": ["libc++"], "tests": ["Release.Default"]}] @@ -143,4 +153,4 @@ jobs: create-issue-when-fault: needs: [preset-test, build-and-test] if: failure() && github.event_name == 'schedule' - uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.5.0 + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.5.3 diff --git a/.github/workflows/pre-commit-check.yml b/.github/workflows/pre-commit-check.yml index 5d1ca93..980f6c5 100644 --- a/.github/workflows/pre-commit-check.yml +++ b/.github/workflows/pre-commit-check.yml @@ -16,4 +16,4 @@ permissions: jobs: pre-commit: - uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.5.0 + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.5.3 diff --git a/.github/workflows/pre-commit-update.yml b/.github/workflows/pre-commit-update.yml index bc842b2..8933e40 100644 --- a/.github/workflows/pre-commit-update.yml +++ b/.github/workflows/pre-commit-update.yml @@ -9,7 +9,7 @@ on: jobs: auto-update-pre-commit: - uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.5.0 + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.5.3 secrets: APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }} PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54087e5..8797adc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,10 +39,4 @@ repos: hooks: - id: codespell - - repo: https://github.com/bemanproject/beman-tidy - rev: v0.3.1 - hooks: - - id: beman-tidy - args: [".", "--verbose", "--require-all"] - exclude: 'cookiecutter/|infra/' diff --git a/CMakeLists.txt b/CMakeLists.txt index 091c1f6..872f184 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,8 +24,9 @@ option( ${PROJECT_IS_TOP_LEVEL} ) -# for find of beman-install-library +# for find of beman_install_library and configure_build_telemetry include(infra/cmake/beman-install-library.cmake) +include(infra/cmake/BuildTelemetryConfig.cmake) add_library(beman.timed_lock_alg INTERFACE) add_library(beman::timed_lock_alg ALIAS beman.timed_lock_alg) @@ -43,6 +44,7 @@ set_target_properties( add_subdirectory(include/beman/timed_lock_alg) beman_install_library(beman.timed_lock_alg TARGETS beman.timed_lock_alg) +configure_build_telemetry() if(BEMAN_TIMED_LOCK_ALG_BUILD_TESTS) enable_testing() diff --git a/README.md b/README.md index 09acc01..f3a46c0 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,10 @@ You can disable building tests by setting CMake option `BEMAN_TIMED_LOCK_ALG_BUI | GCC | 15-13 | C++26-C++20 | libstdc++ | | GCC | 12-11 | C++23, C++20 | libstdc++ | | Clang | 22-19 | C++26-C++20 | libstdc++, libc++ | -| Clang | 18-17 | C++26-C++20 | libc++ | -| Clang | 18-17 | C++20 | libstdc++ | +| Clang | 18 | C++26-C++20 | libc++ | +| Clang | 18 | C++23-C++20 | libstdc++ | +| Clang | 17 | C++26-C++20 | libc++ | +| Clang | 17 | C++20 | libstdc++ | | AppleClang | latest | C++26-C++20 | libc++ | | MSVC | latest | C++23 | MSVC STL | diff --git a/infra/.beman_submodule b/infra/.beman_submodule index 424d64e..8463363 100644 --- a/infra/.beman_submodule +++ b/infra/.beman_submodule @@ -1,3 +1,3 @@ [beman_submodule] remote=https://github.com/bemanproject/infra.git -commit_hash=54dcdad8b661a405a6ac06453f0f06da5d30ba5c +commit_hash=dfdb103b5fc9cccd3424c377130e318466f1dd89 diff --git a/infra/.pre-commit-config.yaml b/infra/.pre-commit-config.yaml index bc4dd84..8052e18 100644 --- a/infra/.pre-commit-config.yaml +++ b/infra/.pre-commit-config.yaml @@ -8,13 +8,13 @@ repos: - id: check-added-large-files - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.2 hooks: - id: codespell # CMake linting and formatting - - repo: https://github.com/BlankSpruce/gersemi - rev: 0.22.3 + - repo: https://github.com/BlankSpruce/gersemi-pre-commit + rev: 0.27.2 hooks: - id: gersemi name: CMake linting diff --git a/infra/README.md b/infra/README.md index a869e46..bf9bbb0 100644 --- a/infra/README.md +++ b/infra/README.md @@ -52,3 +52,37 @@ Some options for the project and target will also be supported: * `BEMAN_INSTALL_CONFIG_FILE_PACKAGES` - a list of package names (e.g., `beman.something`) for which to install the config file (default: all packages) * `_INSTALL_CONFIG_FILE_PACKAGE` - a per-project option to enable/disable config file installation (default: `ON` if the project is top-level, `OFF` otherwise). For instance for `beman.something`, the option would be `BEMAN_SOMETHING_INSTALL_CONFIG_FILE_PACKAGE`. + +# BuildTelemetry + +The cmake modules in this library provide access to CMake instrumentation data in Google Trace format which is visualizable with chrome://tracing and https://ui.perfetto.dev. + +Telemetry may be enabled in several ways: + +## `include` + +```cmake +include (infra/cmake/BuildTelemetry.cmake) +configure_build_telemetry() +``` + +## `find_package` + +```cmake +find_package(BuildTelemetry) +configure_build_telemetry() +``` + +as long as [BuildTelemetryConfig.cmake](./cmake/BuildTelemetryConfig.cmake) is in your module path. + +## `CMAKE_PROJECT_TOP_LEVEL_INCLUDES` +A non-invasive way to inject this telemetry into a CMake build you do not want to modify. +Add: +```sh +-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=infra/cmake/BuildTelemetry.cmake +``` +To the cmake invocation. + +In any form, CMake will call `telemetry.sh` which will copy the trace data in json format into a `.trace` subdirectory within the build directory. + +Multiple calls to `configure_build_telemetry` will only configure the callback hooks once, so it is safe to enable multiple times, including by TOP_LEVEL_INCLUDE. diff --git a/infra/cmake/BuildTelemetry.cmake b/infra/cmake/BuildTelemetry.cmake new file mode 100755 index 0000000..c2ff343 --- /dev/null +++ b/infra/cmake/BuildTelemetry.cmake @@ -0,0 +1,4 @@ +include_guard(GLOBAL) + +include(${CMAKE_CURRENT_LIST_DIR}/BuildTelemetryConfig.cmake) +configure_build_telemetry() diff --git a/infra/cmake/BuildTelemetryConfig.cmake b/infra/cmake/BuildTelemetryConfig.cmake new file mode 100755 index 0000000..15aae48 --- /dev/null +++ b/infra/cmake/BuildTelemetryConfig.cmake @@ -0,0 +1,58 @@ +include_guard(GLOBAL) + +set(BUILD_TELEMETRY_DIR ${CMAKE_CURRENT_LIST_DIR}) + +function(configure_build_telemetry) + if(NOT BUILD_TELEMETRY_CONFIGURATION) + # Check if the CMake version is at least 4.3 + if(CMAKE_VERSION VERSION_LESS "4.3") + message( + STATUS + "CMake version is less than 4.3, configuring cmake_instrumentation is unavailable." + ) + return() + else() + message(STATUS "Configuring Build Telemetry") + endif() + + # Find bash and jq for the telemetry callback script. + # On Windows, Git for Windows provides bash if available. + find_program(BEMAN_BASH bash) + find_program(BEMAN_JQ jq) + if(NOT BEMAN_BASH OR NOT BEMAN_JQ) + message( + STATUS + "bash or jq not found, build telemetry disabled on this platform." + ) + return() + endif() + + # Telemetry query + cmake_instrumentation( + API_VERSION 1 + DATA_VERSION 1 + OPTIONS staticSystemInformation dynamicSystemInformation trace + HOOKS + postGenerate + preBuild + postBuild + preCMakeBuild + postCMakeBuild + postCMakeInstall + postCTest + CALLBACK ${BEMAN_BASH} + ${BUILD_TELEMETRY_DIR}/telemetry.sh + ) + message( + DEBUG + "using callback script ${BUILD_TELEMETRY_DIR}/telemetry.sh via ${BEMAN_BASH}" + ) + + # Mark configuration as done in cache + set(BUILD_TELEMETRY_CONFIGURATION + TRUE + CACHE INTERNAL + "Flag to ensure Build Telemetry configured only once" + ) + endif() +endfunction(configure_build_telemetry) diff --git a/infra/cmake/Config.cmake.in b/infra/cmake/Config.cmake.in index 81adf80..3f1341c 100644 --- a/infra/cmake/Config.cmake.in +++ b/infra/cmake/Config.cmake.in @@ -3,10 +3,10 @@ include(CMakeFindDependencyMacro) -@BEMAN_FIND_DEPENDENCIES@ +@BEMAN_INSTALL_FIND_DEPENDENCIES@ @PACKAGE_INIT@ -include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/@BEMAN_INSTALL_BASE_PKG_NAME@-targets.cmake) -check_required_components(@PROJECT_NAME@) +check_required_components(@BEMAN_INSTALL_BASE_PKG_NAME@) diff --git a/infra/cmake/beman-install-library.cmake b/infra/cmake/beman-install-library.cmake index a77ee1a..dc5a4d1 100644 --- a/infra/cmake/beman-install-library.cmake +++ b/infra/cmake/beman-install-library.cmake @@ -86,14 +86,14 @@ function(beman_install_library name) set(multiValueArgs TARGETS DEPENDENCIES) cmake_parse_arguments( - BEMAN + BEMAN_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) - if(NOT BEMAN_TARGETS) + if(NOT BEMAN_INSTALL_TARGETS) message( FATAL_ERROR "beman_install_library(${name}): TARGETS must be specified" @@ -103,7 +103,7 @@ function(beman_install_library name) if(CMAKE_SKIP_INSTALL_RULES) message( WARNING - "beman_install_library(${name}): not installing targets '${BEMAN_TARGETS}' due to CMAKE_SKIP_INSTALL_RULES" + "beman_install_library(${name}): not installing targets '${BEMAN_INSTALL_TARGETS}' due to CMAKE_SKIP_INSTALL_RULES" ) return() endif() @@ -113,16 +113,16 @@ function(beman_install_library name) # ---------------------------- # Defaults # ---------------------------- - if(NOT BEMAN_NAMESPACE) - set(BEMAN_NAMESPACE "beman::") + if(NOT BEMAN_INSTALL_NAMESPACE) + set(BEMAN_INSTALL_NAMESPACE "beman::") endif() - if(NOT BEMAN_EXPORT_NAME) - set(BEMAN_EXPORT_NAME "${name}-targets") + if(NOT BEMAN_INSTALL_EXPORT_NAME) + set(BEMAN_INSTALL_EXPORT_NAME "${name}-targets") endif() - if(NOT BEMAN_DESTINATION) - set(BEMAN_DESTINATION "${_config_install_dir}/modules") + if(NOT BEMAN_INSTALL_DESTINATION) + set(BEMAN_INSTALL_DESTINATION "${_config_install_dir}/modules") endif() string(REPLACE "beman." "" install_component_name "${name}") @@ -134,7 +134,7 @@ function(beman_install_library name) # -------------------------------------------------- # Install each target with all of its file sets # -------------------------------------------------- - foreach(_tgt IN LISTS BEMAN_TARGETS) + foreach(_tgt IN LISTS BEMAN_INSTALL_TARGETS) if(NOT TARGET "${_tgt}") message( WARNING @@ -177,8 +177,7 @@ function(beman_install_library name) ) foreach(_install_header_set IN LISTS _available_header_sets) list( - APPEND - _install_header_set_args + APPEND _install_header_set_args FILE_SET "${_install_header_set}" COMPONENT @@ -198,7 +197,7 @@ function(beman_install_library name) ) install( TARGETS "${_tgt}" - EXPORT ${BEMAN_EXPORT_NAME} + EXPORT ${BEMAN_INSTALL_EXPORT_NAME} ARCHIVE COMPONENT "${install_component_name}_Development" LIBRARY COMPONENT "${install_component_name}_Runtime" @@ -206,7 +205,7 @@ function(beman_install_library name) RUNTIME COMPONENT "${install_component_name}_Runtime" ${_install_header_set_args} FILE_SET ${_module_sets} - DESTINATION "${BEMAN_DESTINATION}" + DESTINATION "${BEMAN_INSTALL_DESTINATION}" COMPONENT "${install_component_name}_Development" # NOTE: There's currently no convention for this location! CK CXX_MODULES_BMI @@ -217,7 +216,7 @@ function(beman_install_library name) else() install( TARGETS "${_tgt}" - EXPORT ${BEMAN_EXPORT_NAME} + EXPORT ${BEMAN_INSTALL_EXPORT_NAME} ARCHIVE COMPONENT "${install_component_name}_Development" LIBRARY COMPONENT "${install_component_name}_Runtime" @@ -233,8 +232,8 @@ function(beman_install_library name) # -------------------------------------------------- # gersemi: off install( - EXPORT ${BEMAN_EXPORT_NAME} - NAMESPACE ${BEMAN_NAMESPACE} + EXPORT ${BEMAN_INSTALL_EXPORT_NAME} + NAMESPACE ${BEMAN_INSTALL_NAMESPACE} CXX_MODULES_DIRECTORY cxx-modules DESTINATION ${_config_install_dir} COMPONENT "${install_component_name}_Development" @@ -279,19 +278,20 @@ function(beman_install_library name) # expand dependencies # ---------------------------------------- set(_beman_find_deps "") - foreach(dep IN LISTS BEMAN_DEPENDENCIES) + foreach(dep IN LISTS BEMAN_INSTALL_DEPENDENCIES) message( VERBOSE "beman-install-library(${name}): Add find_dependency(${dep})" ) string(APPEND _beman_find_deps "find_dependency(${dep})\n") endforeach() - set(BEMAN_FIND_DEPENDENCIES "${_beman_find_deps}") + set(BEMAN_INSTALL_FIND_DEPENDENCIES "${_beman_find_deps}") # ---------------------------------------- # Generate + install config files # ---------------------------------------- if(_install_config) + set(BEMAN_INSTALL_BASE_PKG_NAME ${name}) configure_package_config_file( "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/Config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${name}-config.cmake" diff --git a/infra/cmake/telemetry.sh b/infra/cmake/telemetry.sh new file mode 100755 index 0000000..307cc94 --- /dev/null +++ b/infra/cmake/telemetry.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash + +set -o nounset +set -o errexit +trap 'echo "Aborting due to errexit on line $LINENO. Exit code: $?" >&2' ERR +set -o errtrace +set -o pipefail +IFS=$'\n\t' + +############################################################################### +# Environment +############################################################################### + +# $_ME +# +# This program's basename. +_ME="$(basename "${0}")" + +############################################################################### +# Help +############################################################################### + +# _print_help() +# +# Usage: +# _print_help +# +# Print the program help information. +_print_help() { + cat <] + ${_ME} -h | --help + +Options: + -h --help Show this screen. + +Environment: + Setting DEBUG_TELEMETRY in the environment will enable DEBUG logging +HEREDOC +} + +############################################################################### +# Program Functions +############################################################################### +_debug_print() { + if [[ -n "${DEBUG_TELEMETRY:-}" ]]; then + printf "[DEBUG] $(date +'%H:%M:%S'): %s \n" "$1" >&2 + fi +} + +_check_file_exists() { + local file="$1" + if [[ ! -f "${file}" ]]; then + echo "Error: File not found: ${file}" >&2 + exit 1 # Exit the entire script with a non-zero status + fi +} + +_process_index() { + indexFile=${1:-} + _check_file_exists "${indexFile}" + _debug_print "$(cat "${indexFile}")" + + local buildDir + buildDir=$(jq -r '.buildDir' "${1:-}") + _debug_print "$(printf "buildDir is |%q|" "${buildDir}")" + + local dataDir + dataDir=$(jq -r '.dataDir' "${1:-}") + _debug_print "$(printf "dataDir is |%q|" "${dataDir}")" + + local hook + hook=$(jq -r '.hook' "${1:-}") + _debug_print "$(printf "hook is |%q|" "${hook}")" + + local trace + trace=$(jq -r '.trace' "${1:-}") + _debug_print "$(printf "trace is |%q|" "${trace}")" + + local outputDir + outputDir="${buildDir}/.trace" + _debug_print "$(printf "Copy trace to |%q|" "${outputDir}")" + mkdir -p "${outputDir}" + + local traceDestFile + traceDestFile="${outputDir}/${hook}-$(basename "${trace}")" + _debug_print "$(printf "traceDestFile: |%q|" "${traceDestFile}")" + cp "${dataDir}/${trace}" "${outputDir}/${hook}-$(basename "${trace}")" +} + +############################################################################### +# Main +############################################################################### + +# _main() +# +# Usage: +# _main [] [] +# +# Description: +# Entry point for the program, handling basic option parsing and dispatching. +_main() { + # Avoid complex option parsing when only one program option is expected. + if [[ "${1:-}" =~ ^-h|--help$ ]] + then + _print_help + else + _process_index "$@" + fi +} + +# Call `_main` after everything has been defined. +_main "$@" diff --git a/infra/cmake/use-fetch-content.cmake b/infra/cmake/use-fetch-content.cmake index eb22be4..f2428b5 100644 --- a/infra/cmake/use-fetch-content.cmake +++ b/infra/cmake/use-fetch-content.cmake @@ -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 @@ -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" @@ -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}" ) @@ -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}" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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}." ) @@ -175,8 +165,7 @@ function(BemanExemplar_provideDependency method package_name) # `include(Catch)` works. if(BemanExemplar_pkgName STREQUAL "Catch2") list( - APPEND - CMAKE_MODULE_PATH + APPEND CMAKE_MODULE_PATH "${${BemanExemplar_name}_SOURCE_DIR}/extras" ) set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)