Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
a8afbbc
Create the repo.
bretbrownjr Apr 6, 2024
00081e6
add toolchain
wusatosi Nov 14, 2024
71f36fb
fix toolchain
wusatosi Nov 14, 2024
0914461
update action script
wusatosi Nov 14, 2024
997a13b
Update toolchain.cmake
wusatosi Nov 14, 2024
da702ae
give up using toolchain
wusatosi Nov 15, 2024
fda3c6b
refactor apply_santizers
wusatosi Nov 15, 2024
6d0ee72
tweak for msvc
wusatosi Nov 26, 2024
475ac87
warp apply_santizers.cmake in ifdef
wusatosi Nov 26, 2024
5265051
extract sanitizer generation as function
wusatosi Nov 26, 2024
db05fcc
update comment
wusatosi Nov 26, 2024
931d6bb
use toolchain
wusatosi Dec 11, 2024
9f47129
move generator out
wusatosi Dec 11, 2024
cabf5fd
remove cmake/apply_santizers.cmake
wusatosi Dec 11, 2024
de10ecf
add msvc toolchain
wusatosi Dec 11, 2024
f925411
apply license
wusatosi Dec 15, 2024
e83824c
adopt include guard
wusatosi Dec 16, 2024
30981d4
apply sanitizer to all targets
wusatosi Dec 20, 2024
0438616
update all release targets
wusatosi Dec 20, 2024
12559d4
asan -> maxsan
wusatosi Dec 20, 2024
18cd513
add documentation
wusatosi Dec 22, 2024
6456fad
remove unneeded include guard
wusatosi Dec 24, 2024
eee29a3
update use of toolchain for appleclang and msvc
wusatosi Dec 25, 2024
7731e02
Initial commit
neatudarius Dec 27, 2024
c05ce19
RELEASE_FLAG -> RELEASE_FLAGS
wusatosi Jan 9, 2025
b76f790
add documentation for /Zi flag
wusatosi Jan 9, 2025
3f13a5f
Readd include guard
wusatosi Jan 11, 2025
2e84093
add include guard for appleclang-toolchain
wusatosi Jan 11, 2025
a4b0a4a
Add skel for infra repo
neatudarius Jan 22, 2025
a9aef1d
beman-tidy: add skel
neatudarius Jan 22, 2025
f85829b
beman-tidy: add checks pipeline
neatudarius Jan 22, 2025
83178a0
Mirror LICENSE from beman repo
neatudarius Feb 12, 2025
9bed1b5
Initial config-file package creation.
chayden83 Feb 12, 2025
64d71a2
beman-tidy: update docs with install instructions
neatudarius Feb 12, 2025
699d2c3
beman-tidy: move requirements.txt
neatudarius Feb 12, 2025
936733b
init
wusatosi Feb 21, 2025
82e3295
Create build_devcontainer.yml
wusatosi Feb 21, 2025
5c64ede
Update build_devcontainer.yml
wusatosi Feb 21, 2025
151fd66
Update build_devcontainer.yml
wusatosi Feb 21, 2025
31df352
Run `pipx ensurepath`
wusatosi Feb 21, 2025
9f0aad1
run `pipx ensurepath` separately
wusatosi Feb 21, 2025
30f0530
revert `pipx ensurepath`
wusatosi Feb 21, 2025
56b6372
swap out dev container definition
wusatosi Feb 23, 2025
c6dc92a
update docker script
wusatosi Feb 23, 2025
c7f6c58
update workflow
wusatosi Feb 23, 2025
4a30c7a
update workflow
wusatosi Feb 23, 2025
b3bd0d8
disable provenance
wusatosi Feb 23, 2025
daee555
fix workflow
wusatosi Feb 23, 2025
7f4bbb9
remove unneeded script
wusatosi Feb 23, 2025
406a856
specify trigger path
wusatosi Feb 24, 2025
c6ab1a2
add license
wusatosi Feb 24, 2025
0d42782
add more docs
wusatosi Feb 24, 2025
aabdc75
Format
wusatosi Feb 24, 2025
7dc1f6e
update docker file to install pre-commit correctly
wusatosi Feb 26, 2025
836d138
only use `beman/devcontainers` on main branch
wusatosi Feb 26, 2025
92d0e89
matrix-fy
wusatosi Feb 26, 2025
decad6d
Fix workflow trigger
wusatosi Feb 26, 2025
821569f
allow build of llvm
wusatosi Feb 26, 2025
c9e4987
Update README.md
wusatosi Feb 26, 2025
fa32732
Fix license header in the example devcontainer setup
wusatosi Feb 26, 2025
ba6f7cb
Merge pull request #121 from chayden83/config-file-package
JeffGarland Feb 28, 2025
027d362
Inject FetchContent logic
bretbrownjr Jan 26, 2025
a47e323
Update CODEOWNERS: add @bemanproject/core-reviewers
neatudarius Mar 11, 2025
9c47aa0
Remove extra GTest_FOUND set
steve-downey Mar 12, 2025
e410fcb
Merge pull request #4 from bemanproject/neatudarius-patch-2
neatudarius Mar 13, 2025
9034da1
Apply suggestions from code review
wusatosi Mar 14, 2025
54085f7
Apply shell check
wusatosi Mar 14, 2025
a2888be
Install `libgtest`
wusatosi Mar 14, 2025
c5374d2
Merge pull request #3 from wusatosi/pre-built-dev-container
wusatosi Mar 14, 2025
7384a2b
Quick fix for `Compute Image Name`
wusatosi Mar 14, 2025
67f6a82
Merge pull request #5 from wusatosi/pre-built-dev-container
wusatosi Mar 15, 2025
4d7b01c
CMake: Add -fsanitize-undefined-trap-on-error to MaxSan configuration
ednolan Mar 16, 2025
67f029e
Merge branch 'main' into fetch-gtest
steve-downey Mar 25, 2025
1144f5e
Merge pull request #140 from steve-downey/fetch-gtest
steve-downey Mar 25, 2025
90f6109
Clean up install logic
bretbrownjr Apr 21, 2025
9ebab82
Formatting and spelling cleanups to pass the exemplar lint check
ednolan Apr 29, 2025
c9626cf
Merge pull request #9 from bemanproject/enolan_formatting1
ednolan Apr 29, 2025
ae209e1
Fix container namespace
wusatosi Apr 29, 2025
5c7d89b
lay way for testing container
wusatosi Apr 29, 2025
cbc7658
add infra for test containers
wusatosi Apr 29, 2025
1924afd
add a test container
wusatosi Apr 29, 2025
7dd4c65
create vscode user if not exist
wusatosi Apr 29, 2025
484748c
update paths
wusatosi Apr 29, 2025
f939491
Fix docker
wusatosi Apr 29, 2025
79ded6c
install gpg
wusatosi Apr 29, 2025
1845856
update matrix
wusatosi Apr 29, 2025
83e3ba0
Add more basic utilities
wusatosi Apr 29, 2025
3541172
Add more gnu versions
wusatosi Apr 29, 2025
c391221
constrain to latest 4 gnu versions
wusatosi Apr 29, 2025
d3452a0
more llvm versions
wusatosi Apr 29, 2025
c02aa34
Update CI workflow name
wusatosi Apr 29, 2025
40664e6
Merge pull request #10 from bemanproject/fix-devcontainer-ci
wusatosi Apr 30, 2025
444ad5f
Merge branch 'main' into test-container-ext
wusatosi Apr 30, 2025
2e92ac6
add ninja build
wusatosi Apr 30, 2025
666d23a
add libc++
wusatosi Apr 30, 2025
f72a7ad
fix install
wusatosi Apr 30, 2025
f2268ab
refactor installation
wusatosi May 2, 2025
607bc0e
specify libc
wusatosi May 2, 2025
39d4fdb
Fix SPDX-License-Identifiers
ednolan May 5, 2025
b52c0ea
Merge pull request #12 from bemanproject/enolan_fixspdx1
ednolan May 5, 2025
55eb625
Link gcov
wusatosi May 7, 2025
d7b9935
Add coverage tool
wusatosi May 7, 2025
cd36fc5
move lcov install to after compiler
wusatosi May 7, 2025
6702256
remove gcov link
wusatosi May 7, 2025
d38f0c4
relink gcov
wusatosi May 7, 2025
3e0ed77
Add llvm 21
wusatosi May 7, 2025
4fe91eb
change naming for gnu, llvm
wusatosi May 10, 2025
a2436e7
gccpg -> gnupg
wusatosi May 10, 2025
dec1832
update naming script
wusatosi May 10, 2025
a8666ff
Update docs
wusatosi May 11, 2025
499a332
Merge remote-tracking branch 'origin/main' into test-container-ext
wusatosi May 11, 2025
03301f7
Merge pull request #11 from bemanproject/test-container-ext
wusatosi May 13, 2025
b40482d
grab clang tools from upstream llvm
nickelpro Jun 2, 2025
22c4122
Invoke AppleClang via system compiler shims
nickelpro Jun 3, 2025
b737b8b
Merge branch 'main' into beman-tidy
Jun 6, 2025
e37f10c
Apply Beman Standard recommended license - LICENSE.APACHE_LLVM
Jun 6, 2025
801ad52
Add basic MD linter config
Jun 6, 2025
3b94a8b
Add basic docs
Jun 6, 2025
2a88819
Merge pull request #21 from neatudarius/tweaks-in-repo
neatudarius Jun 6, 2025
011106d
Merge branch 'main' into beman-tidy
Jun 6, 2025
e438438
beman-tidy: write tests for README.TITLE
Jun 7, 2025
322f23a
Merge pull request #1 from neatudarius/beman-tidy-add-beman-standard-…
neatudarius Jun 7, 2025
b48b697
beman-tidy: enable tests on CI
Jun 7, 2025
c8c823e
beman-tidy: add linter for Python code
Jun 7, 2025
c348698
beman-tidy: fix broken CI flow
Jun 7, 2025
253a852
beman-tidy: add SPDX license identifier
Jun 7, 2025
617461a
Fix missing EOF at end of containers/install_sys.sh
ednolan Jun 9, 2025
fbb2568
Merge pull request #23 from bemanproject/enolan_fixeof1
ednolan Jun 9, 2025
ccf07da
Add toolchain files from exemplar, preserving history
ednolan Jun 9, 2025
1fc41fb
Add toolchain files and beman-submodule
ednolan May 1, 2025
ce53242
Merge pull request #13 from bemanproject/enolan_bemanmodule4
ednolan Jun 9, 2025
92c7fce
Update CODEOWNERS: add explicit owners
neatudarius Jun 11, 2025
214439f
Merge pull request #24 from bemanproject/neatudarius-patch-3
neatudarius Jun 11, 2025
dde360b
beman-tidy: run the tool from any path
Jun 16, 2025
afa9204
beman-tidy: expose as precommit hooks
Jun 16, 2025
f8b7f2c
beman-tidy: cleanup
Jun 16, 2025
2afdab8
Merge pull request #5 from neatudarius/beman-tidy-into-precommit
neatudarius Jun 16, 2025
c05ab2e
beman-tidy: expose as precommit hooks
Jun 16, 2025
3a77acb
beman-tidy: rename precommit hook
Jun 16, 2025
e419307
beman-tidy: rename CI job
Jun 16, 2025
4d668c5
Merge pull request #2 from neatudarius/beman-tidy
neatudarius Jun 16, 2025
36e78f4
beman-tidy: support for pyproject.toml and uv
rishyak Jun 9, 2025
6a1ad9e
beman-tidy: ruff linter tweaks (#1)
neatudarius Jun 16, 2025
53534e7
[beman-tidy] beman-tidy: improve docs and examples (#2)
neatudarius Jun 17, 2025
e41e239
chore(gitignore): add editor config files
rishyak Jun 18, 2025
6bd41ec
chore: add @rishyak to codeowners
rishyak Jun 18, 2025
51bbe1e
Merge pull request #31 from rishyak/rish.pep518
rishyak Jun 18, 2025
bec9a86
[beman-tidy] exclude build artifacts
Jun 18, 2025
ea5ada9
Exclude more build artifacts
neatudarius Jun 18, 2025
880442e
Merge pull request #34 from bemanproject/neatudarius-patch-4
neatudarius Jun 18, 2025
edb8b13
Merge branch 'main' into beman-tidy-docs
neatudarius Jun 18, 2025
fd95646
Merge pull request #36 from neatudarius/beman-tidy-docs
neatudarius Jun 18, 2025
2b182c5
[beman-tidy] consistently use pathlib.Path rather than os.path
Tsche Jun 19, 2025
9d9a5a1
[beman-tidy] consistently use pathlib.Path rather than os.path
Tsche Jun 19, 2025
9e1177a
Remove Docker infrastructure files moved to bemanproject/containers
ednolan Jun 23, 2025
9b8b17a
markdownlint: Don't include code blocks in line length check
ednolan Jun 25, 2025
6167b77
pre-commit: Add exemplar's checks, make them pass, add them to CI
ednolan Jun 25, 2025
e30b822
Fix duplicative CI runs when updating a pull request
ednolan Jun 25, 2025
3b7c1dc
beman-submodule: Fix beman-submodule update --remote
ednolan Jun 25, 2025
debcb14
Disable Markdown linting
ednolan Jun 30, 2025
f859d0b
CODEOWNERS: remove @bemanproject/core-reviewers
ednolan Jun 30, 2025
93706a9
style: add linting and formatting to pre-commit for python
rishyak Jun 28, 2025
7942988
Merge pull request #104 from rishyak/pre-commit
rishyak Jun 30, 2025
fe8d41e
Revert "style: add linting and formatting to pre-commit for python"
ednolan Jun 30, 2025
679b3bb
style: add linting and formatting to pre-commit for python
rishyak Jun 30, 2025
e0da70b
Merge pull request #106 from rishyak/pre-commit
rishyak Jun 30, 2025
458b0a7
Update docs
neatudarius Jul 3, 2025
6827189
Merge pull request #108 from bemanproject/neatudarius-patch-6
neatudarius Jul 3, 2025
209f39a
Add toolchain for Clang with libc++
ednolan Jul 6, 2025
73dfaca
Implement allow_untracked_files
ednolan Jul 7, 2025
7e7cbd3
[beman-submodule] Fix status command with untracked files
ednolan Jul 7, 2025
63e3196
[beman-submodule] Fix missing newline at end of file with allow_untra…
ednolan Jul 7, 2025
ddb0588
[beman-submodule] Fix debug print in update function
ednolan Jul 7, 2025
73ea580
[beman-submodule] Fix another missing newline
ednolan Jul 7, 2025
7061546
use-fetch-content.cmake: Support lockfiles with zero dependencies
ednolan Jul 8, 2025
d65bfba
Indentation fix and add CMake linter to pre-commit
ednolan Jul 8, 2025
1cb7483
Fix libc++ toolchain file
ednolan Jul 8, 2025
df2c66c
Update cmake/llvm-libc++-toolchain.cmake
ednolan Jul 8, 2025
8e81f1d
[beman-tidy] Added 'exclude' rule for the CMake linter
vickgoodman Jul 10, 2025
f87e7b8
[beman-tidy] Added newlines for the dummy CMake files and refined the…
vickgoodman Jul 10, 2025
64c73ba
[beman-tidy] Removed 'exclude' rule for CMake linter and added a spac…
vickgoodman Jul 10, 2025
2a73d16
[beman-tidy] Fixed 'exclude' rule for CMake linter
vickgoodman Jul 10, 2025
9559c52
[beman-tidy] Reverted changes in pre-commit config file and added .cm…
vickgoodman Jul 10, 2025
78a7665
[beman-tidy] Reverted changes in pre commit config file
vickgoodman Jul 11, 2025
8402131
[beman-tidy] Added 'exclude' rule for CMake linter to exclude test da…
vickgoodman Jul 11, 2025
6f3c9f9
Merge pull request #123 from vickgoodman/beman-tidy-implement-check-T…
vickgoodman Jul 11, 2025
999fb54
Update CODEOWNERS
neatudarius Jul 14, 2025
86ed4dc
Sync LICENSE with exemplar/LICENSE
Jul 16, 2025
4e4f283
Merge pull request #136 from neatudarius/sync-LICENSE
neatudarius Jul 16, 2025
f13fd92
[beman-tidy] CI flows should build, install and run beman-tidy
Jul 20, 2025
b22bf57
[beman-tidy] CI flows: split in run_linter, run_tests, build_and_inst…
Jul 20, 2025
9ed5591
[beman-tidy] CI tests should run on schedule and on demand.
neatudarius Jul 22, 2025
72de34b
[beman-tidy] Set CI tests run schedule
neatudarius Jul 22, 2025
c2e5148
Merge pull request #154 from bemanproject/neatudarius-patch-8
neatudarius Jul 22, 2025
47411c1
Tweaks in docs
neatudarius Jul 22, 2025
9b76a1e
Merge pull request #158 from bemanproject/neatudarius-patch-9
neatudarius Jul 22, 2025
345e889
[beman-tidy] Apply Beman Standard updates: LICENSE.APPROVED changed
Jul 25, 2025
41d3ed8
Merge pull request #163 from neatudarius/issue/160
neatudarius Aug 4, 2025
1d2453a
Add a beman_install_library CMake function
bretbrownjr Aug 4, 2025
8e45a74
Merge pull request #171 from bretbrownjr/beman-install-library
bretbrownjr Aug 25, 2025
9bc9710
Polish beman_install_library
bretbrownjr Sep 7, 2025
e98506f
Fix CMake formatting
bretbrownjr Sep 7, 2025
79f578f
Merge pull request #190 from bretbrownjr/fix-install-option
bretbrownjr Sep 8, 2025
92993bd
Wrong content in debug string for use-fetch-content.cmake
bolry Sep 16, 2025
ec70178
Update pre-commit hooks
ednolan Sep 28, 2025
bb58b2a
remove beman-tidy artifact
wusatosi Sep 28, 2025
7fb7c28
chore: remove tidy hook && python precommit linting
rishyak Sep 29, 2025
68ad626
Merge pull request #3 from rishyak/precommit
rishyak Oct 9, 2025
9f89e81
Expect config file template in cmake/ directory rather than src/
ednolan Jan 4, 2026
b3545a4
Fix incorrect default for project_INSTALL_CONFIG_FILE_PACKAGE
ednolan Jan 4, 2026
57db20a
chore: address Ruff python lints
ptsouchlos Jan 27, 2026
322f31d
Remove beman-submodule since it's been migrated to bemanproject/beman…
ednolan Feb 7, 2026
a09c5ce
Refactory beman-install-library cmake module
ClausKlein Feb 16, 2026
c41f9bf
install CXX_MODULES_BMI too
ClausKlein Mar 9, 2026
08da99a
Remove cmake_minimum_required directive from beman-install-library.cmake
ednolan Mar 2, 2026
32efddb
Remove dead _lib_install_dir/_bin_install_dir references
ednolan Mar 2, 2026
14f9d4b
Fix config file installation precedence
ednolan Mar 2, 2026
5ab1d7b
Remove VERSION_SUFFIX mechanism
ednolan Mar 2, 2026
63cb577
Remove beman-install-library-config.cmake
Mar 15, 2026
4af649a
Use INTERFACE_CXX_MODULE_SETS to install only a PUBLIC module
ClausKlein Mar 25, 2026
54dcdad
Add workaround for Catch2 to use-fetch-content.cmake
ednolan Apr 1, 2026
752a065
Installation tweaks for library
steve-downey Apr 9, 2026
a8006d6
Update cmake/beman-install-library.cmake
steve-downey Apr 9, 2026
d095e60
Bump the github-actions group with 2 updates
dependabot[bot] Apr 12, 2026
f6318dd
Bump actions/upload-artifact in the github-owned-actions group
dependabot[bot] Apr 12, 2026
572dd44
Merge pull request #76 from steve-downey/dependabot/github_actions/gi…
steve-downey Apr 12, 2026
5a01d4c
Merge pull request #77 from steve-downey/dependabot/github_actions/gi…
steve-downey Apr 12, 2026
6279952
Merge branch 'bemanproject:main' into main
steve-downey Apr 12, 2026
0ed07f6
Fix BEMAN_FIND_DEPENDENCIES variable name in Config.cmake.in
Apr 12, 2026
4684dc7
Add BuildTelemetry cmake module
steve-downey Feb 7, 2026
edf2b2e
Update cmake/BuildTelemetry.cmake
steve-downey Feb 8, 2026
5440506
Update cmake/BuildTelemetryConfig.cmake
steve-downey Feb 8, 2026
3cd8fca
Update cmake/BuildTelemetryConfig.cmake
steve-downey Feb 8, 2026
28048ff
Improve diagnostic messages
steve-downey Feb 17, 2026
def83c5
CMake 4.3 releases instrumentation
steve-downey Apr 10, 2026
a26dc81
Clarify forms of access and remove PNG
steve-downey Apr 12, 2026
300e594
Update cmake/BuildTelemetryConfig.cmake
steve-downey Apr 11, 2026
1e994d4
repoint beman_submodule
steve-downey Apr 13, 2026
f2cf13f
delete infra
steve-downey Apr 13, 2026
6f86d2f
Add 'infra/' from commit '300e5942b44132f5abaf62e62b4471a0e408579d'
steve-downey Apr 13, 2026
6c2b80d
tag beman infra submodule
steve-downey Apr 13, 2026
eb49cba
Merge branch 'main' into update-subtree
steve-downey Apr 13, 2026
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 infra/.beman_submodule
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[beman_submodule]
remote=https://github.com/bemanproject/infra.git
commit_hash=63cb577f6484f13ce3349de49ad5ce27e20bf1da
remote=https://github.com/steve-downey/infra.git
commit_hash=300e5942b44132f5abaf62e62b4471a0e408579d
allow_untracked_files=True
36 changes: 26 additions & 10 deletions infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,36 @@ Some options for the project and target will also be supported:
(default: all packages)
* `<BEMAN_NAME>_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`.

#### `beman_cmake_instrumentation`
# BuildTelemetry

The cmake modules in this library are intended to provide access to CMake instrumentation data in Google Trace format which is visualizable with chrome://tracing and https://ui.perfetto.dev.
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.

Instrumentation may be enabled either by adding to the CMAKE_PROJECT_TOP_LEVEL_INCLUDES
```sh
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=infra/cmake/bemancmakeinstrumentation.cmake
Telemetry may be enabled in several ways:

## `include`

```cmake
include (infra/cmake/BuildTelemetry.cmake)
configure_build_telemetry()
```
or by calling explicitly within the CMakeList.txt file.

## `find_package`

```cmake
find_package(BemanCMakeInstrumentation)
configure_beman_cmake_instrumentation()
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 either form, CMake will call `instrumentation.sh` which will copy the trace data in json format into a `.trace` subdirectory within the build directory.
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_beman_cmake_instrumentation` will only configure the callback hooks once, so it is safe to include multiple times, including by TOP_LEVEL_INCLUDE.
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.
4 changes: 4 additions & 0 deletions infra/cmake/BuildTelemetry.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include_guard(GLOBAL)

include(${CMAKE_CURRENT_LIST_DIR}/BuildTelemetryConfig.cmake)
configure_build_telemetry()
39 changes: 39 additions & 0 deletions infra/cmake/BuildTelemetryConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
include_guard(GLOBAL)

set(BUILD_TELEMETRY_DIR ${CMAKE_CURRENT_LIST_DIR})

function(configure_build_telemetry)
if(NOT BUILD_TELEMETRY_CONFIGURATION)
message(STATUS "Configuring Build Telemetry")

# Check if the CMake version is at least 4.3
if(CMAKE_VERSION VERSION_LESS "4.3")
message(
WARNING
"CMake version is less than 4.3, configuring cmake_instrumentation is unavailable."
)
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 ${BUILD_TELEMETRY_DIR}/telemetry.sh
)
message(
WARNING
"using callback script ${BUILD_TELEMETRY_DIR}/telemetry.sh"
)

# 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)
6 changes: 3 additions & 3 deletions infra/cmake/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@)
45 changes: 23 additions & 22 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 All @@ -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"
Expand All @@ -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()
Expand All @@ -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}")
Expand All @@ -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
Expand Down Expand Up @@ -189,24 +189,24 @@ 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}"
EXPORT ${BEMAN_EXPORT_NAME}
EXPORT ${BEMAN_INSTALL_EXPORT_NAME}
ARCHIVE COMPONENT "${install_component_name}_Development"
LIBRARY
COMPONENT "${install_component_name}_Runtime"
NAMELINK_COMPONENT "${install_component_name}_Development"
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
Expand All @@ -217,7 +217,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"
Expand All @@ -233,8 +233,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"
Expand Down Expand Up @@ -279,19 +279,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"
Expand Down
29 changes: 0 additions & 29 deletions infra/cmake/bemancmakeinstrumentation-config.cmake

This file was deleted.

6 changes: 0 additions & 6 deletions infra/cmake/bemancmakeinstrumentation.cmake

This file was deleted.

7 changes: 5 additions & 2 deletions infra/cmake/instrumentation.sh → infra/cmake/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _ME="$(basename "${0}")"
_print_help() {
cat <<HEREDOC

Callback script to process CMake Instrumentation data
Callback script to process CMake Insrumentation data
https://cmake.org/cmake/help/latest/command/cmake_instrumentation.html

Usage:
Expand All @@ -38,14 +38,17 @@ Usage:

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:-}" ]]; then
if [[ -n "${DEBUG_TELEMETRY:-}" ]]; then
printf "[DEBUG] $(date +'%H:%M:%S'): %s \n" "$1" >&2
fi
}
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
Loading