Skip to content
Merged
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
1 change: 1 addition & 0 deletions .exemplar_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f5759898e1ac110fc070791b83267f13c9b50b4c
22 changes: 1 addition & 21 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Codeowners for reviews on PRs

# Note(river):
# **Please understand how codeowner file work before uncommenting anything in this section:**
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
#
# For projects using cstring_view as a template and intend to reuse its infrastructure,
# River (@wusatosi) helped create most of the original infrastructure under the scope described below,
# they are more than happy to help out with any PRs downstream,
# as well as to sync any useful change upstream to cstring_view.
#
# Github Actions:
# .github/workflows/ @wusatosi # Add other project owners here
#
# Devcontainer:
# .devcontainer/ @wusatosi # Add other project owners here
#
# Pre-commit:
# .pre-commit-config.yaml @wusatosi # Add other project owners here
# .markdownlint.yaml @wusatosi # Add other project owners here

* @dascandy @neatudarius
* @dascandy
10 changes: 5 additions & 5 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
pull_request:
workflow_dispatch:
schedule:
- cron: '6 13 * * 5'
- cron: '35 16 * * 1'

jobs:
beman-submodule-check:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.5.0

preset-test:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.5.0
with:
matrix_config: >
[
Expand All @@ -31,7 +31,7 @@ jobs:
]

build-and-test:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.5.0
with:
matrix_config: >
{
Expand Down Expand Up @@ -129,4 +129,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.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.5.0
8 changes: 7 additions & 1 deletion .github/workflows/pre-commit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
branches:
- main

permissions:
contents: read
checks: write
issues: write
pull-requests: write

jobs:
pre-commit:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.5.0
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ name: Weekly pre-commit autoupdate
on:
workflow_dispatch:
schedule:
- cron: "39 15 * * 6"
- cron: "28 13 * * 1"

jobs:
auto-update-pre-commit:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.3.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.5.0
secrets:
APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }}
PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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: v22.1.1
rev: v22.1.2
hooks:
- id: clang-format
types_or: [c++, c]
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.30...4.3)
project(
beman.cstring_view # CMake Project Name, which is also the name of the top-level
# targets (e.g., library, executable, etc.).
DESCRIPTION "cstring_view, a null-terminated string view"
DESCRIPTION "A null-terminated string view."
LANGUAGES CXX
VERSION 0.1.0
)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ that this requires GoogleTest to be installed.
cmake \
-B build \
-S . \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=20 \
# Your extra arguments here.
cmake --build build
ctest --test-dir build
Expand Down Expand Up @@ -69,7 +69,7 @@ Example commands:
cmake \
-B build \
-S . \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./infra/cmake/use-fetch-content.cmake
cmake --build build
ctest --test-dir build
Expand Down
1 change: 0 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

set(ALL_EXAMPLES example)

message("Examples to be built: ${ALL_EXAMPLES}")

foreach(example ${ALL_EXAMPLES})
Expand Down
2 changes: 1 addition & 1 deletion infra/.beman_submodule
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[beman_submodule]
remote=https://github.com/bemanproject/infra.git
commit_hash=63cb577f6484f13ce3349de49ad5ce27e20bf1da
commit_hash=54dcdad8b661a405a6ac06453f0f06da5d30ba5c
10 changes: 5 additions & 5 deletions infra/cmake/beman-install-library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ include(GNUInstallDirs)
# HEADERS to the default CMAKE install destination.
#
# It also handles the installation of the CMake config package files if
# needed. If the given targets has FILE_SET CXX_MODULE, it will also
# needed. If the given targets has a PUBLIC FILE_SET CXX_MODULE, it will also
# installed to the given DESTINATION
#
# Cache variables:
Expand All @@ -72,7 +72,7 @@ include(GNUInstallDirs)
# Caveats
# -------
#
# **Only one `FILE_SET CXX_MODULES` is yet supported to install with this
# **Only one `PUBLIC FILE_SET CXX_MODULES` is yet supported to install with this
# function!**
#
# **Only header files contained in a `PUBLIC FILE_SET TYPE HEADERS` will be
Expand Down Expand Up @@ -189,12 +189,12 @@ function(beman_install_library name)
set(_install_header_set_args FILE_SET HEADERS) # Note: empty FILE_SET in this case! CK
endif()

# Detect presence of C++ module file sets, exact one expected!
get_target_property(_module_sets "${_tgt}" CXX_MODULE_SETS)
# Detect presence of PUBLIC C++ module file sets. Note: exact one is expected!
get_target_property(_module_sets "${_tgt}" INTERFACE_CXX_MODULE_SETS)
if(_module_sets)
message(
VERBOSE
"beman-install-library(${name}): '${_tgt}' has CXX_MODULE_SETS=${_module_sets}"
"beman-install-library(${name}): '${_tgt}' has INTERFACE_CXX_MODULE_SETS=${_module_sets}"
)
install(
TARGETS "${_tgt}"
Expand Down
12 changes: 12 additions & 0 deletions infra/cmake/use-fetch-content.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,18 @@ function(BemanExemplar_provideDependency method package_name)
set(INSTALL_GTEST OFF) # Disable GoogleTest installation
FetchContent_MakeAvailable("${BemanExemplar_name}")

# Catch2's CTest integration module isn't on CMAKE_MODULE_PATH
# when brought in via FetchContent. Add it so that
# `include(Catch)` works.
if(BemanExemplar_pkgName STREQUAL "Catch2")
list(
APPEND
CMAKE_MODULE_PATH
"${${BemanExemplar_name}_SOURCE_DIR}/extras"
)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
endif()

# Important! <PackageName>_FOUND tells CMake that `find_package` is
# not needed for this package anymore
set("${BemanExemplar_pkgName}_FOUND" TRUE PARENT_SCOPE)
Expand Down
2 changes: 1 addition & 1 deletion tests/beman/cstring_view/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ target_sources(
)
target_link_libraries(
beman.cstring_view.tests.cstring_view
PRIVATE beman::cstring_view GTest::gtest GTest::gtest_main
PRIVATE beman::cstring_view GTest::gtest_main
)

include(GoogleTest)
Expand Down
Loading