diff --git a/.github/workflows/.beman_submodule b/.github/workflows/.beman_submodule deleted file mode 100644 index bb15231..0000000 --- a/.github/workflows/.beman_submodule +++ /dev/null @@ -1,4 +0,0 @@ -[beman_submodule] -remote=https://github.com/bemanproject/infra-workflows.git -commit_hash=f1afd008de5fcee15a2a20a8b513e5dcde41e67e -allow_untracked_files=True diff --git a/.github/workflows/.github/CODEOWNERS b/.github/workflows/.github/CODEOWNERS deleted file mode 100644 index 7a5f53c..0000000 --- a/.github/workflows/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @ednolan diff --git a/.github/workflows/LICENSE b/.github/workflows/LICENSE deleted file mode 100644 index 111a208..0000000 --- a/.github/workflows/LICENSE +++ /dev/null @@ -1,230 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ----- LLVM Exceptions to the Apache 2.0 License ---- - -As an exception, if, as a result of your compiling your source code, portions -of this Software are embedded into an Object form of such source code, you -may redistribute such embedded portions in such Object form without complying -with the conditions of Sections 4(a), 4(b) and 4(d) of the License. - -In addition, if you combine or link compiled forms of this Software with -software that is licensed under the GPLv2 ("Combined Software") and if a -court of competent jurisdiction determines that the patent provision (Section -3), the indemnity provision (Section 9) or other Section of the License -conflicts with the conditions of the GPLv2, you may retroactively and -prospectively choose to deem waived or otherwise exclude such Section(s) of -the License, but only in their entirety and only with respect to the Combined -Software. - -============================================================================== -Software from third parties included in the Beman Project: -============================================================================== -The Beman Project contains third party software which is under different license -terms. All such code will be identified clearly using at least one of two -mechanisms: -1) It will be in a separate directory tree with its own `LICENSE.txt` or - `LICENSE` file at the top containing the specific license and restrictions - which apply to that software, or -2) It will contain specific license and restriction terms at the top of every - file. diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index f71fd91..0000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Beman Project Reusable Github Actions Repository - - - -This repository contains [reusable GitHub Actions -workflows](https://docs.github.com/en/actions/how-tos/sharing-automations/reusing-workflows) -workflow files, intended to help unify the GitHub Actions machinery used across Beman -repositories for CI. It contains the following reusable workflows: - -## `reusable-beman-build-and-test.yml` - -This is the main workflow file used for CI. It takes in a JSON build configuration like -the following example: - -```json -{ - "gcc": [ - { "versions": ["15"], - "tests": [ - { "cxxversions": ["c++26"], - "tests": [ - { "stdlibs": ["libstdc++"], - "tests": [ - "Debug.Default", "Release.Default", "Debug.TSan", "Debug.MaxSan", - "Debug.Werror", "Debug.Dynamic" - ] - } - ] - }, - { "cxxversions": ["c++23", "c++20", "c++17"], - "tests": [{ "stdlibs": ["libstdc++"], "tests": ["Release.Default"]}] - } - ] - }, - "clang-p2996": [ - { "versions": ["trunk"], - "tests": [ - { "cxxversions": ["c++26"], - "tests": [{"stdlibs": ["libc++"], "tests": ["Release.-DCMAKE_CXX_FLAGS='-freflection-latest'"]}] - } - ] - } - ] -} -``` - -It then runs jobs corresponding to the specified set of configurations. - -## `reusable-beman-create-issue-when-fault.yml` - -This workflow is intended to help with projects that invoke CI on a scheduled basis when -those jobs fail. It creates a GitHub issue describing the CI failure. - -## `reusable-beman-preset-test.yml` - -This workflow is intended to ensure that the CMake presets provided by beman/infra are -valid and working for the given repository. It takes in a JSON build configuration like -the following: - -```json -[ - {"preset": "gcc-debug", "image": "ghcr.io/bemanproject/infra-containers-gcc:latest"}, - {"preset": "gcc-release", "image": "ghcr.io/bemanproject/infra-containers-gcc:latest"}, - {"preset": "llvm-debug", "image": "ghcr.io/bemanproject/infra-containers-clang:latest"}, - {"preset": "llvm-release", "image": "ghcr.io/bemanproject/infra-containers-clang:latest"}, - {"preset": "appleclang-debug", "runner": "macos-latest"}, - {"preset": "appleclang-release", "runner": "macos-latest"}, - {"preset": "msvc-debug", "runner": "windows-latest"}, - {"preset": "msvc-release", "runner": "windows-latest"} -] -``` - -It then runs jobs corresponding to the specified set of presets. - -## `reusable-beman-pre-commit.yml` - -This provides a workflow for running the -[pre-commit](https://github.com/pre-commit/pre-commit) checks Beman libraries use, on pull -requests and on push. - -## `reusable-beman-submodule-check.yml` - -This provides a workflow for checking consistency of -[`beman-submodule`](https://github.com/bemanproject/infra/blob/main/tools/beman-submodule/README.md) -directories used by Beman repositories to deduplicate infrastructure. diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 6266c55..7ebde3c 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -13,10 +13,10 @@ on: jobs: beman-submodule-check: - uses: ./.github/workflows/reusable-beman-submodule-check.yml + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.2.1 preset-test: - uses: ./.github/workflows/reusable-beman-preset-test.yml + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.2.1 with: matrix_config: > [ @@ -31,7 +31,7 @@ jobs: ] build-and-test: - uses: ./.github/workflows/reusable-beman-build-and-test.yml + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.2.1 with: matrix_config: > { @@ -63,7 +63,7 @@ jobs: } ], "clang": [ - { "versions": ["20"], + { "versions": ["21"], "tests": [ {"cxxversions": ["c++26"], "tests": [ @@ -82,7 +82,7 @@ jobs: } ] }, - { "versions": ["19"], + { "versions": ["20", "19"], "tests": [ { "cxxversions": ["c++26", "c++23"], "tests": [ @@ -93,7 +93,7 @@ jobs: }, { "versions": ["18"], "tests": [ - { "cxxversions": ["c++26", "c++23"], + { "cxxversions": ["c++23"], "tests": [{"stdlibs": ["libstdc++"], "tests": ["Release.Default"]}] } ] @@ -123,7 +123,13 @@ jobs: ] } + install-test: + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-install-test.yml@1.2.1 + with: + image: ghcr.io/bemanproject/infra-containers-gcc:latest + cxx_standard: 26 + create-issue-when-fault: needs: [preset-test, build-and-test] if: failure() && github.event_name == 'schedule' - uses: ./.github/workflows/reusable-beman-create-issue-when-fault.yml + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.2.1 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit-check.yml similarity index 70% rename from .github/workflows/pre-commit.yml rename to .github/workflows/pre-commit-check.yml index 2409d2f..5749343 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit-check.yml @@ -10,4 +10,4 @@ on: jobs: pre-commit: - uses: ./.github/workflows/reusable-beman-pre-commit.yml + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.2.1 diff --git a/.github/workflows/pre-commit-update.yml b/.github/workflows/pre-commit-update.yml new file mode 100644 index 0000000..9261dbf --- /dev/null +++ b/.github/workflows/pre-commit-update.yml @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +name: Weekly pre-commit autoupdate + +on: + workflow_dispatch: + schedule: + - cron: "0 16 * * 0" + +jobs: + auto-update-pre-commit: + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.2.1 + secrets: + APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }} + PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }} diff --git a/.github/workflows/reusable-beman-build-and-test.yml b/.github/workflows/reusable-beman-build-and-test.yml deleted file mode 100644 index b1cd4f1..0000000 --- a/.github/workflows/reusable-beman-build-and-test.yml +++ /dev/null @@ -1,175 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -name: 'Beman build-and-test matrix' -on: - workflow_call: - inputs: - matrix_config: - description: 'JSON specification of tests to run' - type: string - required: true -jobs: - configure_test_matrix: - name: Configure test matrix - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v4 - - id: set-matrix - shell: python - run: | - import json - import os - import sys - - input_data = json.loads('''${{inputs.matrix_config}}''') - output_list = [] - - image_prefix = "ghcr.io/bemanproject/infra-containers-" - for compiler, compiler_tests in input_data.items(): - for compiler_test in compiler_tests: - for version in compiler_test["versions"]: - image = None - if compiler == "gcc" or compiler.startswith("clang"): - image = image_prefix + compiler + ":" + version - for versions_test in compiler_test["tests"]: - for cxxversion in versions_test["cxxversions"]: - for cxxversion_test in versions_test["tests"]: - for stdlib in cxxversion_test["stdlibs"]: - for stdlib_test in cxxversion_test["tests"]: - test = { - "compiler": compiler, - "version": version, - "cxxversion": cxxversion, - "stdlib": stdlib, - "test": stdlib_test - } - if image is not None: - test["image"] = image - output_list.append(test) - json_string = json.dumps(output_list) - with open(os.environ['GITHUB_OUTPUT'], 'a') as output_file: - print(f"matrix={json_string}", file=output_file) - test_matrix: - needs: configure_test_matrix - strategy: - fail-fast: false - matrix: - config: ${{ fromJson(needs.configure_test_matrix.outputs.matrix) }} - name: "${{ matrix.config.compiler }} ${{ matrix.config.version }} ${{ matrix.config.cxxversion }} ${{ matrix.config.stdlib }} ${{ matrix.config.test }}" - runs-on: >- - ${{ (matrix.config.compiler == 'gcc' || startsWith(matrix.config.compiler, 'clang')) && 'ubuntu-latest' - || (matrix.config.compiler == 'appleclang' && 'macos-latest') - || (matrix.config.compiler == 'msvc' && 'windows-latest') }} - container: ${{ matrix.config.image }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Setup MSVC - if: matrix.config.compiler == 'msvc' - uses: TheMrMilchmann/setup-msvc-dev@v3 - with: - arch: x64 - - name: Setup Macos - if: matrix.config.compiler == 'appleclang' - shell: bash - run: sudo chmod -R 777 /opt/ - - name: Print installed software - shell: bash - run: | - echo "Build system:" - cmake --version - ninja --version - - name: Process configuration - id: vars - shell: bash - run: | - cxxversion=${{ matrix.config.cxxversion }} - echo "cpp_version=${cxxversion#c++}" >> "$GITHUB_OUTPUT" - case ${{ matrix.config.compiler }} in - gcc) echo "toolchain_file=infra/cmake/gnu-toolchain.cmake" >> "$GITHUB_OUTPUT" ;; - clang*) - case ${{ matrix.config.stdlib }} in - libstdc++) - echo "toolchain_file=infra/cmake/llvm-toolchain.cmake" >> "$GITHUB_OUTPUT" ;; - libc++) - echo "toolchain_file=infra/cmake/llvm-libc++-toolchain.cmake" >> "$GITHUB_OUTPUT" ;; - esac ;; - appleclang) - echo "toolchain_file=infra/cmake/appleclang-toolchain.cmake" >> "$GITHUB_OUTPUT" ;; - msvc) - echo "toolchain_file=infra/cmake/msvc-toolchain.cmake" >> "$GITHUB_OUTPUT" ;; - esac - test=${{ matrix.config.test }} - echo "build_config=${test%%[.]*}" >> "$GITHUB_OUTPUT" - test_type=${test##*[.]} - echo "test_type=$test_type" >> "$GITHUB_OUTPUT" - case $test_type in - Default) ;; - TSan) - echo "cmake_extra_args=-DBEMAN_BUILDSYS_SANITIZER=TSan" >> "$GITHUB_OUTPUT" ;; - MaxSan) - echo "cmake_extra_args=-DBEMAN_BUILDSYS_SANITIZER=MaxSan" >> "$GITHUB_OUTPUT" ;; - Werror) - echo "cmake_extra_args=-DCMAKE_CXX_FLAGS='-Werror=all -Werror=extra'" >> "$GITHUB_OUTPUT" ;; - Dynamic) - echo "cmake_extra_args=-DBUILD_SHARED_LIBS=on" >> "$GITHUB_OUTPUT" ;; - Coverage) - echo "cmake_extra_args=-DCMAKE_CXX_FLAGS='-fno-default-inline -fno-inline --coverage -fprofile-abs-path'" >> "$GITHUB_OUTPUT";; - *) - echo "cmake_extra_args=$test_type" >> "$GITHUB_OUTPUT" ;; - esac - - name: Print parameters - shell: bash - run: | - echo ${{ matrix.config.compiler }} ${{ matrix.config.cxxversion }} ${{ matrix.config.stdlib }} ${{ matrix.config.test }} - echo ${{ steps.vars.outputs.cpp_version }} ${{ steps.vars.outputs.toolchain_file }} ${{ steps.vars.outputs.cmake_extra_args }} ${{ steps.vars.outputs.build_config }} - - name: Configure CMake - shell: bash - run: | - cmake \ - -B build \ - -S . \ - -DCMAKE_CXX_STANDARD=${{ steps.vars.outputs.cpp_version }} \ - -DCMAKE_TOOLCHAIN_FILE="${{ steps.vars.outputs.toolchain_file }}" \ - -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="./infra/cmake/use-fetch-content.cmake" \ - ${{ steps.vars.outputs.cmake_extra_args }} - env: - CMAKE_GENERATOR: "Ninja Multi-Config" - - name: Build - shell: bash - run: | - cmake --build build --config ${{ steps.vars.outputs.build_config }} --parallel --verbose - cmake --build build --config ${{ steps.vars.outputs.build_config }} --target all_verify_interface_header_sets - cmake --install build --config ${{ steps.vars.outputs.build_config }} --prefix /opt/beman.package - ls -R /opt/beman.package - - name: Test - shell: bash - run: ctest --test-dir build --build-config ${{ steps.vars.outputs.build_config }} --output-on-failure - - name: Generate Coverage Files - if: steps.vars.outputs.test_type == 'Coverage' - shell: bash - run: | - cat > gcovr.cfg < [!NOTE] +> +> Versions outside of this range would likely work as well, +> especially if you're using a version above the given range +> (e.g. HEAD/ nightly). +> These development environments are verified using our CI configuration. -### Dependencies -This project has no C or C++ dependencies. +## Development -Build-time dependencies: +### Develop using GitHub Codespace -- `cmake` -- `ninja`, `make`, or another CMake-supported build system - - CMake defaults to "Unix Makefiles" on POSIX systems +This project supports [GitHub Codespace](https://github.com/features/codespaces) +via [Development Containers](https://containers.dev/), +which allows rapid development and instant hacking in your browser. +We recommend using GitHub codespace to explore this project as it +requires minimal setup. -#### How to install dependencies +Click the following badge to create a codespace: + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/bemanproject/transform_view) + +For more documentation on GitHub codespaces, please see +[this doc](https://docs.github.com/en/codespaces/). + +> [!NOTE] +> +> The codespace container may take up to 5 minutes to build and spin-up; this is normal. + +### Develop locally on your machines
-Dependencies install transform_view on Ubuntu 24.04 + For Linux -```shell -# Install tools: -apt-get install -y cmake make ninja-build +Beman libraries require [recent versions of CMake](#build-environment), +we recommend downloading CMake directly from [CMake's website](https://cmake.org/download/) +or installing it with the [Kitware apt library](https://apt.kitware.com/). -# Toolchains: -apt-get install \ - g++-14 gcc-14 \ - clang-18 clang++-18 clang-19 clang++-19 -``` +A [supported compiler](#supported-platforms) should be available from your package manager.
-Dependencies install transform_view on MAC OS $VERSION + For MacOS - -```shell -# TODO +Beman libraries require [recent versions of CMake](#build-environment). +Use [`Homebrew`](https://brew.sh/) to install the latest version of CMake. + +```bash +brew install cmake +``` + +A [supported compiler](#supported-platforms) is also available from brew. + +For example, you can install the latest major release of Clang as: + +```bash +brew install llvm ```
-Dependencies install transform_view on Windows $VERSION - + For Windows -```shell -# TODO -``` +To build Beman libraries, you will need the MSVC compiler. MSVC can be obtained +by installing Visual Studio; the free Visual Studio 2022 Community Edition can +be downloaded from +[Microsoft](https://visualstudio.microsoft.com/vs/community/). + +After Visual Studio has been installed, you can launch "Developer PowerShell for +VS 2022" by typing it into Windows search bar. This shell environment will +provide CMake, Ninja, and MSVC, allowing you to build the library and run the +tests. + +Note that you will need to use FetchContent to build GoogleTest. To do so, +please see the instructions in the "Build GoogleTest dependency from github.com" +dropdown in the [Project specific configure +arguments](#project-specific-configure-arguments) section.
-### How to build beman.transform_view +### Configure and Build the Project Using CMake Presets + +This project recommends using [CMake Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) +to configure, build and test the project. +Appropriate presets for major compilers have been included by default. +You can use `cmake --list-presets` to see all available presets. -This project strives to be as normal and simple a CMake project as possible. -This build workflow in particular will work, -producing a static `libbeman.transform_view.a` library, ready to package with its headers: +Here is an example to invoke the `gcc-debug` preset. ```shell cmake --workflow --preset gcc-debug -cmake --workflow --preset gcc-release -cmake --install build/gcc-release --prefix /opt/beman.transform_view ``` -
- Build beman.transform_view (verbose logs) +Generally, there are two kinds of presets, `debug` and `release`. -```shell -# Configure beman.transform_view via gcc-debug workflow for development. -$ cmake --workflow --preset gcc-debug -Executing workflow step 1 of 3: configure preset "gcc-debug" - -Preset CMake variables: - - CMAKE_BUILD_TYPE="Debug" - CMAKE_CXX_COMPILER="g++-14" - CMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined" - CMAKE_CXX_STANDARD="23" - -Examples to be built: transform_view_direct_usage --- Configuring done (0.3s) --- Generating done (0.0s) --- Build files have been written to: /home/tzlaine/transform_view/build/gcc-debug - -Executing workflow step 2 of 3: build preset "gcc-debug" - -[6/6] Linking CXX executable tests/beman/transform_view/beman.transform_view.tests.transform_view - -Executing workflow step 3 of 3: test preset "gcc-debug" - -Test project /home/tzlaine/transform_view/build/gcc-debug - Start 1: transform_view_.iter_concept_categroy - 1/25 Test #1: transform_view_.iter_concept_categroy ...................... Passed 0.01 sec - Start 2: transform_view_.default_ctor - 2/25 Test #2: transform_view_.default_ctor ............................... Passed 0.02 sec - Start 3: transform_view_.base_ - 3/25 Test #3: transform_view_.base_ ...................................... Passed 0.03 sec - Start 4: transform_view_.begin_end - 4/25 Test #4: transform_view_.begin_end .................................. Passed 0.02 sec - Start 5: transform_view_.copy_func_empty_range_copy_alg - 5/25 Test #5: transform_view_.copy_func_empty_range_copy_alg ............. Passed 0.01 sec - Start 6: transform_view_.copy_func_copy_alg - 6/25 Test #6: transform_view_.copy_func_copy_alg ......................... Passed 0.03 sec - Start 7: transform_view_.copy_func_empty_range_adaptor_copy_alg - 7/25 Test #7: transform_view_.copy_func_empty_range_adaptor_copy_alg ..... Passed 0.03 sec - Start 8: transform_view_.copy_func_adaptor_copy_alg - 8/25 Test #8: transform_view_.copy_func_adaptor_copy_alg ................. Passed 0.02 sec - Start 9: transform_view_.copy_func_empty_range_adaptor_to_vec - 9/25 Test #9: transform_view_.copy_func_empty_range_adaptor_to_vec ....... Passed 0.04 sec - Start 10: transform_view_.copy_func_adaptor_to_vec -10/25 Test #10: transform_view_.copy_func_adaptor_to_vec ................... Passed 0.03 sec - Start 11: transform_view_.lower_func_copy_alg -11/25 Test #11: transform_view_.lower_func_copy_alg ........................ Passed 0.02 sec - Start 12: transform_view_.lower_func_range_adaptor -12/25 Test #12: transform_view_.lower_func_range_adaptor ................... Passed 0.03 sec - Start 13: transform_view_.lower_func_adaptor_to_vec -13/25 Test #13: transform_view_.lower_func_adaptor_to_vec .................. Passed 0.04 sec - Start 14: transform_view_.lower_upper_func_copy_alg -14/25 Test #14: transform_view_.lower_upper_func_copy_alg .................. Passed 0.04 sec - Start 15: transform_view_.lower_upper_func_range_adaptor -15/25 Test #15: transform_view_.lower_upper_func_range_adaptor ............. Passed 0.03 sec - Start 16: transform_view_.lower_upper_func_adaptor_to_vec -16/25 Test #16: transform_view_.lower_upper_func_adaptor_to_vec ............ Passed 0.02 sec - Start 17: transform_view_.sentinel_lower_func_copy_alg -17/25 Test #17: transform_view_.sentinel_lower_func_copy_alg ............... Passed 0.02 sec - Start 18: transform_view_.sentinel_lower_func_range_adaptor -18/25 Test #18: transform_view_.sentinel_lower_func_range_adaptor .......... Passed 0.02 sec - Start 19: transform_view_.sentinel_lower_func_adaptor_to_vec -19/25 Test #19: transform_view_.sentinel_lower_func_adaptor_to_vec ......... Passed 0.02 sec - Start 20: transform_view_.sentinel_lower_upper_func_copy_alg -20/25 Test #20: transform_view_.sentinel_lower_upper_func_copy_alg ......... Passed 0.02 sec - Start 21: transform_view_.sentinel_lower_upper_func_range_adaptor -21/25 Test #21: transform_view_.sentinel_lower_upper_func_range_adaptor .... Passed 0.02 sec - Start 22: transform_view_.sentinel_lower_upper_func_adaptor_to_vec -22/25 Test #22: transform_view_.sentinel_lower_upper_func_adaptor_to_vec ... Passed 0.02 sec - Start 23: transform_view_.borrowability -23/25 Test #23: transform_view_.borrowability .............................. Passed 0.03 sec - Start 24: transform_view_.borrowability_safety -24/25 Test #24: transform_view_.borrowability_safety ....................... Passed 0.03 sec - Start 25: transform_view_.borrowability_safety_failure -25/25 Test #25: transform_view_.borrowability_safety_failure ............... Passed 0.03 sec - -100% tests passed, 0 tests failed out of 25 - -Total Test time (real) = 0.60 sec - -# Configure beman.transform_view via gcc-release workflow for direct usage. -$ cmake --workflow --preset gcc-release -Executing workflow step 1 of 3: configure preset "gcc-release" - -Preset CMake variables: - - CMAKE_BUILD_TYPE="RelWithDebInfo" - CMAKE_CXX_COMPILER="g++-14" - CMAKE_CXX_FLAGS="-O3" - CMAKE_CXX_STANDARD="23" - -Examples to be built: transform_view_direct_usage --- Configuring done (0.3s) --- Generating done (0.0s) --- Build files have been written to: /home/tzlaine/transform_view/build/gcc-release - -Executing workflow step 2 of 3: build preset "gcc-release" - -[6/6] Linking CXX executable tests/beman/transform_view/beman.transform_view.tests.transform_view - -Executing workflow step 3 of 3: test preset "gcc-release" - -Test project /home/tzlaine/transform_view/build/gcc-release - Start 1: transform_view_.iter_concept_categroy - 1/25 Test #1: transform_view_.iter_concept_categroy ...................... Passed 0.00 sec - Start 2: transform_view_.default_ctor - 2/25 Test #2: transform_view_.default_ctor ............................... Passed 0.00 sec - Start 3: transform_view_.base_ - 3/25 Test #3: transform_view_.base_ ...................................... Passed 0.00 sec - Start 4: transform_view_.begin_end - 4/25 Test #4: transform_view_.begin_end .................................. Passed 0.00 sec - Start 5: transform_view_.copy_func_empty_range_copy_alg - 5/25 Test #5: transform_view_.copy_func_empty_range_copy_alg ............. Passed 0.00 sec - Start 6: transform_view_.copy_func_copy_alg - 6/25 Test #6: transform_view_.copy_func_copy_alg ......................... Passed 0.00 sec - Start 7: transform_view_.copy_func_empty_range_adaptor_copy_alg - 7/25 Test #7: transform_view_.copy_func_empty_range_adaptor_copy_alg ..... Passed 0.00 sec - Start 8: transform_view_.copy_func_adaptor_copy_alg - 8/25 Test #8: transform_view_.copy_func_adaptor_copy_alg ................. Passed 0.00 sec - Start 9: transform_view_.copy_func_empty_range_adaptor_to_vec - 9/25 Test #9: transform_view_.copy_func_empty_range_adaptor_to_vec ....... Passed 0.00 sec - Start 10: transform_view_.copy_func_adaptor_to_vec -10/25 Test #10: transform_view_.copy_func_adaptor_to_vec ................... Passed 0.00 sec - Start 11: transform_view_.lower_func_copy_alg -11/25 Test #11: transform_view_.lower_func_copy_alg ........................ Passed 0.00 sec - Start 12: transform_view_.lower_func_range_adaptor -12/25 Test #12: transform_view_.lower_func_range_adaptor ................... Passed 0.00 sec - Start 13: transform_view_.lower_func_adaptor_to_vec -13/25 Test #13: transform_view_.lower_func_adaptor_to_vec .................. Passed 0.00 sec - Start 14: transform_view_.lower_upper_func_copy_alg -14/25 Test #14: transform_view_.lower_upper_func_copy_alg .................. Passed 0.00 sec - Start 15: transform_view_.lower_upper_func_range_adaptor -15/25 Test #15: transform_view_.lower_upper_func_range_adaptor ............. Passed 0.00 sec - Start 16: transform_view_.lower_upper_func_adaptor_to_vec -16/25 Test #16: transform_view_.lower_upper_func_adaptor_to_vec ............ Passed 0.00 sec - Start 17: transform_view_.sentinel_lower_func_copy_alg -17/25 Test #17: transform_view_.sentinel_lower_func_copy_alg ............... Passed 0.00 sec - Start 18: transform_view_.sentinel_lower_func_range_adaptor -18/25 Test #18: transform_view_.sentinel_lower_func_range_adaptor .......... Passed 0.00 sec - Start 19: transform_view_.sentinel_lower_func_adaptor_to_vec -19/25 Test #19: transform_view_.sentinel_lower_func_adaptor_to_vec ......... Passed 0.00 sec - Start 20: transform_view_.sentinel_lower_upper_func_copy_alg -20/25 Test #20: transform_view_.sentinel_lower_upper_func_copy_alg ......... Passed 0.00 sec - Start 21: transform_view_.sentinel_lower_upper_func_range_adaptor -21/25 Test #21: transform_view_.sentinel_lower_upper_func_range_adaptor .... Passed 0.00 sec - Start 22: transform_view_.sentinel_lower_upper_func_adaptor_to_vec -22/25 Test #22: transform_view_.sentinel_lower_upper_func_adaptor_to_vec ... Passed 0.00 sec - Start 23: transform_view_.borrowability -23/25 Test #23: transform_view_.borrowability .............................. Passed 0.00 sec - Start 24: transform_view_.borrowability_safety -24/25 Test #24: transform_view_.borrowability_safety ....................... Passed 0.00 sec - Start 25: transform_view_.borrowability_safety_failure -25/25 Test #25: transform_view_.borrowability_safety_failure ............... Passed 0.00 sec - -100% tests passed, 0 tests failed out of 25 - -Total Test time (real) = 0.04 sec - -# Run examples. -$ build/gcc-release/examples/beman.transform_view.examples.transform_view_direct_usage -lower +The `debug` presets are designed to aid development, so it has debugging +instrumentation enabled and many sanitizers enabled. -``` +> [!NOTE] +> +> The sanitizers that are enabled vary from compiler to compiler. +> See the toolchain files under ([`cmake`](cmake/)) to determine the exact configuration used for each preset. -
+The `release` presets are designed for production use, and +consequently have the highest optimization turned on (e.g. `O3`). -
- Install beman.transform_view (verbose logs) +### Configure and Build Manually -```shell -# Install build artifacts from `build` directory into `opt/beman.transform_view` path. -$ cmake --install build/gcc-release --prefix /opt/beman.transform_view --- Install configuration: "RelWithDebInfo" --- Installing: /opt/beman.transform_view/lib/libbeman.transform_view.a --- Installing: /opt/beman.transform_view/include/beman/transform_view/transform_view.hpp - -# Check tree. -$ tree /opt/beman.transform_view -/opt/beman.transform_view -├── include -│   └── beman -│   └── transform_view -│   └── transform_view.hpp -└── lib - └── libbeman.transform_view.a +If the presets are not suitable for your use-case, a traditional CMake +invocation will provide more configurability. -5 directories, 2 files +To configure, build and test the project with extra arguments, +you can run this set of commands. + +```bash +cmake \ + -B build \ + -S . \ + -DCMAKE_CXX_STANDARD=20 \ + -DCMAKE_PREFIX_PATH=$PWD/infra/cmake \ + # Your extra arguments here. +cmake --build build +ctest --test-dir build ``` -
+> [!IMPORTANT] +> +> Beman projects are +> [passive projects](https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#cmake), +> therefore, +> you will need to specify the C++ version via `CMAKE_CXX_STANDARD` +> when manually configuring the project. -
- Disable tests build +### Finding and Fetching GTest from GitHub + +If you do not have GoogleTest installed on your development system, you may +optionally configure this project to download a known-compatible release of +GoogleTest from source and build it as well. -To build this project with tests disabled (and their dependencies), -simply use `BEMAN_TRANSFORM_VIEW_BUILD_TESTING=OFF` as documented in upstream [CMake documentation](https://cmake.org/cmake/help/latest/module/CTest.html): +Example commands: ```shell -cmake -B build -S . -DBEMAN_TRANSFORM_VIEW_BUILD_TESTING=OFF +cmake -B build -S . \ + -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./infra/cmake/use-fetch-content.cmake \ + -DCMAKE_CXX_STANDARD=20 +cmake --build build --target all +cmake --build build --target test ``` -
+The precise version of GoogleTest that will be used is maintained in +`./lockfile.json`. -## Integrate beman.transform_view into your project +### Project specific configure arguments + +Project-specific options are prefixed with `BEMAN_TRANSFORM_VIEW`. +You can see the list of available options with: + +```bash +cmake -LH -S . -B build | grep "BEMAN_TRANSFORM_VIEW" -C 2 +```
- Use beman.transform_view directly from C++ -This library is header only. If you want to use `beman.transform_view` from your -project, you can include `beman/transform_view/*.hpp` files from your C++ source -files + Details of CMake arguments. -```cpp -#include -``` +#### `BEMAN_TRANSFORM_VIEW_BUILD_TESTS` -and directly link with `libbeman.transform_view.a` +Enable building tests and test infrastructure. Default: ON. +Values: `{ ON, OFF }`. -```shell -# Assume /opt/beman.transform_view staging directory. -$ c++ -o transform_view_usage examples/transform_view_direct_usage.cpp \ - -I /opt/beman.transform_view/include/ \ - -L/opt/beman.transform_view/lib/ -lbeman.transform_view +You can configure the project to have this option turned off via: + +```bash +cmake -B build -S . -DCMAKE_CXX_STANDARD=20 -DBEMAN_TRANSFORM_VIEW_BUILD_TESTS=OFF ``` +> [!TIP] +> Because this project requires GoogleTest for running tests, +> disabling `BEMAN_TRANSFORM_VIEW_BUILD_TESTS` avoids the project from +> cloning GoogleTest from GitHub. + +#### `BEMAN_TRANSFORM_VIEW_BUILD_EXAMPLES` + +Enable building examples. Default: ON. Values: { ON, OFF }. + +#### `BEMAN_TRANSFORM_VIEW_INSTALL_CONFIG_FILE_PACKAGE` + +Enable installing the CMake config file package. Default: ON. +Values: { ON, OFF }. + +This is required so that users of `beman.transform_view` can use +`find_package(beman.transform_view)` to locate the library. +
-
- Use beman.transform_view directly from CMake +## Integrate beman.transform_view into your project - +To use `beman.transform_view` in your C++ project, +include an appropriate `beman.transform_view` header from your source code. -For CMake based projects, you will need to use the `beman.transform_view` CMake module to define the `beman::transform_view` CMake target: +```c++ +#include +``` + +> [!NOTE] +> +> `beman.transform_view` headers are to be included with the `beman/transform_view/` prefix. +> Altering include search paths to spell the include target another way (e.g. +> `#include `) is unsupported. + +The process for incorporating `beman.transform_view` into your project depends on the +build system being used. Instructions for CMake are provided in following sections. + +### Incorporating `beman.transform_view` into your project with CMake + +For CMake based projects, +you will need to use the `beman.transform_view` CMake module +to define the `beman::transform_view` CMake target: ```cmake find_package(beman.transform_view REQUIRED) ``` -You will also need to add `beman::transform_view` -to the link libraries of any libraries or executables that include `beman/transform_view/*.hpp` in their source or header file. +You will also need to add `beman::transform_view` to the link libraries of +any libraries or executables that include `beman.transform_view` headers. ```cmake target_link_libraries(yourlib PUBLIC beman::transform_view) ``` -
- -
- Use beman.transform_view from other build systems - - +### Produce beman.transform_view interface library -Build systems that support `pkg-config` by providing a `beman.transform_view.pc` file. -Build systems that support interoperation via `pkg-config` should be able to detect `beman.transform_view` for you automatically. +You can produce transform_view's interface library locally by: -
- -### Compiler support +```bash +cmake --workflow --preset gcc-release +cmake --install build/gcc-release --prefix /opt/beman +``` -GCC 14 or later; Clang 18 or later; or VS 2022 or later. +This will generate the following directory structure at `/opt/beman`. -Building this repository requires **C++23** or later. +```txt +/opt/beman +├── include +│ └── beman +│ └── transform_view +│ └── transform_view.hpp +└── lib + └── cmake + └── beman.transform_view + ├── beman.transform_view-config-version.cmake + ├── beman.transform_view-config.cmake + └── beman.transform_view-targets.cmake +``` diff --git a/cmake/beman.transform_view-config.cmake.in b/cmake/beman.transform_view-config.cmake.in new file mode 100644 index 0000000..7a187ef --- /dev/null +++ b/cmake/beman.transform_view-config.cmake.in @@ -0,0 +1,7 @@ +set(BEMAN_TRANSFORM_VIEW_VERSION @PROJECT_VERSION@) + +@PACKAGE_INIT@ + +include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake) + +check_required_components(@PROJECT_NAME@) diff --git a/include/beman/transform_view/CMakeLists.txt b/include/beman/transform_view/CMakeLists.txt new file mode 100644 index 0000000..86347a6 --- /dev/null +++ b/include/beman/transform_view/CMakeLists.txt @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +target_sources( + beman.transform_view + PUBLIC FILE_SET HEADERS FILES transform_view.hpp +) diff --git a/infra/.beman_submodule b/infra/.beman_submodule index bfed167..10ea6a3 100644 --- a/infra/.beman_submodule +++ b/infra/.beman_submodule @@ -1,3 +1,3 @@ [beman_submodule] remote=https://github.com/bemanproject/infra.git -commit_hash=bb58b2a1cc894d58a55bf745be78f5d27029e245 +commit_hash=b3545a45640abd1fedc01441ca3f220d9ac5a8e3 diff --git a/infra/.pre-commit-config.yaml b/infra/.pre-commit-config.yaml index e806e59..bc4dd84 100644 --- a/infra/.pre-commit-config.yaml +++ b/infra/.pre-commit-config.yaml @@ -19,14 +19,3 @@ repos: - id: gersemi name: CMake linting exclude: ^.*/tests/.*/data/ # Exclude test data directories - - # Python linting and formatting - # config file: ruff.toml (not currently present but add if needed) - # https://docs.astral.sh/ruff/configuration/ - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.13.2 - hooks: - - id: ruff-check - files: ^tools/beman-tidy/ - - id: ruff-format - files: ^tools/beman-tidy/ diff --git a/infra/.pre-commit-hooks.yaml b/infra/.pre-commit-hooks.yaml deleted file mode 100644 index d327587..0000000 --- a/infra/.pre-commit-hooks.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- id: beman-tidy - name: "beman-tidy: bemanification your repo" - entry: ./tools/beman-tidy/beman-tidy - language: script - pass_filenames: false - always_run: true - args: [".", "--verbose"] diff --git a/infra/cmake/beman-install-library-config.cmake b/infra/cmake/beman-install-library-config.cmake index e7fd0ad..c40959d 100644 --- a/infra/cmake/beman-install-library-config.cmake +++ b/infra/cmake/beman-install-library-config.cmake @@ -84,8 +84,8 @@ function(beman_install_library name) option( ${project_prefix}_INSTALL_CONFIG_FILE_PACKAGE - "Enable building examples. Default: ${PROJECT_IS_TOP_LEVEL}. Values: { ON, OFF }." - ${PROJECT_IS_TOP_LEVEL} + "Enable creating and installing a CMake config-file package. Default: ON. Values: { ON, OFF }." + ON ) # By default, install the config package @@ -121,7 +121,7 @@ function(beman_install_library name) find_file( config_file_template NAMES "${package_name}-config.cmake.in" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" + PATHS "${PROJECT_SOURCE_DIR}/cmake" NO_DEFAULT_PATH NO_CACHE REQUIRED diff --git a/src/beman/transform_view/CMakeLists.txt b/src/beman/transform_view/CMakeLists.txt deleted file mode 100644 index 4336cf1..0000000 --- a/src/beman/transform_view/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -include(GNUInstallDirs) - -add_library(beman.transform_view) -add_library(beman::transform_view ALIAS beman.transform_view) - -target_sources(beman.transform_view PRIVATE transform_view.cpp) - -target_sources( - beman.transform_view - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../../include - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/beman/transform_view/transform_view.hpp -) - -set_target_properties( - beman.transform_view - PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON EXPORT_NAME transform_view -) - -install( - TARGETS beman.transform_view - COMPONENT beman.transform_view - EXPORT beman.transform_view - DESTINATION ${CMAKE_INSTALL_LIBDIR}$<$:/debug> - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}$<$:/debug> - FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -) - -if(BEMAN_TRANSFORM_VIEW_INSTALL_CONFIG_FILE_PACKAGE) - include(CMakePackageConfigHelpers) - - configure_package_config_file( - "${CMAKE_CURRENT_SOURCE_DIR}/beman.transform_view-config.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/beman.transform_view-config.cmake" - INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/beman.transform_view" - PATH_VARS PROJECT_NAME PROJECT_VERSION - ) - - write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/beman.transform_view-config-version.cmake" - VERSION ${PROJECT_VERSION} - COMPATIBILITY ExactVersion - ) - - install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/beman.transform_view-config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/beman.transform_view-config-version.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/beman.transform_view" - COMPONENT beman.transform_view - ) - - install( - EXPORT beman.transform_view - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/beman.transform_view" - NAMESPACE beman:: - FILE beman.transform_view-targets.cmake - COMPONENT beman.transform_view - ) -endif() diff --git a/src/beman/transform_view/transform_view.cpp b/src/beman/transform_view/transform_view.cpp deleted file mode 100644 index 3b789db..0000000 --- a/src/beman/transform_view/transform_view.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -#include