File tree Expand file tree Collapse file tree 8 files changed +46
-32
lines changed
Expand file tree Collapse file tree 8 files changed +46
-32
lines changed Original file line number Diff line number Diff line change 11---
2+ BasedOnStyle : LLVM
3+ IndentWidth : 2
4+ ---
25Language : Cpp
36AccessModifierOffset : -2
47AlignAfterOpenBracket : Align
@@ -106,11 +109,11 @@ IfMacros:
106109 - KJ_IF_MAYBE
107110IncludeBlocks : Preserve
108111IncludeCategories :
109- - Regex : ' ^"(llvm|llvm-c|clang|clang-c)/'
112+ - Regex : ' ^"(beman| llvm|llvm-c|clang|clang-c)/'
110113 Priority : 2
111114 SortPriority : 0
112115 CaseSensitive : false
113- - Regex : ' ^(<|"(gtest|isl|json)/)'
116+ - Regex : ' ^(<|"(catch2| gtest|gmock |isl|json)/)'
114117 Priority : 3
115118 SortPriority : 0
116119 CaseSensitive : false
Original file line number Diff line number Diff line change 11// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2- // README at: https://github.com/devcontainers/templates/tree/main/src/cpp
2+ // README at: https://github.com/devcontainers/templates/tree/main/src/cpp
33
4- {
5- "name" : " Beman Project Generic Devcontainer" ,
6- "image" : " ghcr.io/bemanproject/infra-containers-devcontainer-gcc:14" ,
7- "postCreateCommand" : " pre-commit" ,
8- "customizations" : {
9- "vscode" : {
10- "extensions" : [
11- " ms-vscode.cpptools" ,
12- " ms-vscode.cmake-tools"
13- ]
14- }
15- }
16- }
4+ {
5+ "name" : " Beman Project Generic Devcontainer" ,
6+ "image" : " ghcr.io/bemanproject/infra-containers-devcontainer-gcc:14" ,
7+ "postCreateCommand" : " pre-commit" ,
8+ "customizations" : {
9+ "vscode" : {
10+ "extensions" : [
11+ " ms-vscode.cpptools" ,
12+ " ms-vscode.cmake-tools"
13+ ]
14+ }
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ .cache
12/compile_commands.json
23/build
34
Original file line number Diff line number Diff line change 77 - id : trailing-whitespace
88 - id : end-of-file-fixer
99 - id : check-yaml
10+ exclude : ^\.clang-(format|tidy)$
1011 - id : check-added-large-files
1112
1213 # Clang-format for C++
1314 # This brings in a portable version of clang-format.
1415 # See also: https://github.com/ssciwr/clang-format-wheel
1516 - repo : https://github.com/pre-commit/mirrors-clang-format
16- rev : v21.1.2
17+ rev : v21.1.6
1718 hooks :
1819 - id : clang-format
19- types_or : [c++, c]
20+ types_or : [c++, c, json ]
2021
2122 # CMake linting and formatting
2223 - repo : https://github.com/BlankSpruce/gersemi
23- rev : 0.22.3
24+ rev : 0.23.1
2425 hooks :
2526 - id : gersemi
2627 name : CMake linting
3031 # Config file: .markdownlint.yaml
3132 # Commented out to disable this by default. Uncomment to enable markdown linting.
3233 # - repo: https://github.com/igorshubovych/markdownlint-cli
33- # rev: v0.42 .0
34+ # rev: v0.46 .0
3435 # hooks:
3536 # - id: markdownlint
3637
4041 - id : codespell
4142 args : ["--ignore-words-list=wil"]
4243
43- exclude : ' cookiecutter /'
44+ exclude : ' infra /'
Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
22
3- cmake_minimum_required (VERSION 3.28...4.1 )
3+ cmake_minimum_required (VERSION 3.28...4.2 )
44
55project (
66 beman.scope
@@ -91,6 +91,8 @@ install(
9191
9292 FILE_SET CXX_MODULES
9393 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
94+ CXX_MODULES_BMI
95+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/beman.scope/bmi-${CMAKE_CXX_COMPILER_ID} _$<CONFIG>
9496 FILE_SET HEADERS
9597)
9698
Original file line number Diff line number Diff line change 22
33set (ALL_EXAMPLES scope_example unique_resource unique_resource-file)
44
5+ # module tests will only compile with gcc15 or clang20 and above
6+ if (CMAKE_CXX_SCAN_FOR_MODULES AND CMAKE_CXX_MODULE_STD)
7+ list (APPEND ALL_EXAMPLES scope-module)
8+ endif ()
9+
510message ("Examples to be built: ${ALL_EXAMPLES} " )
611
712foreach (example ${ALL_EXAMPLES} )
Original file line number Diff line number Diff line change 1515// destroy noisy
1616// scope exit: true success: true fail: false
1717
18+ // #ifdef HAS_MODULE_STD
1819import std;
20+ // #else
21+ // NOTE: this needs C++23!
22+ // #include <print>
23+ // #endif
24+
1925import beman.scope;
2026
2127// clang-format off
Original file line number Diff line number Diff line change @@ -5,21 +5,17 @@ include(FetchContent)
55FetchContent_Declare(
66 Catch2
77 GIT_REPOSITORY https://github.com/catchorg/Catch2.git
8- GIT_TAG v3.8.0
8+ GIT_TAG v3.11.0
9+ EXCLUDE_FROM_ALL
10+ # FIND_PACKAGE_ARGS 3.11
911)
1012FetchContent_MakeAvailable(Catch2)
1113
14+ set (ALL_TESTNAMES scope_success scope_exit scope_fail unique_resource)
15+
1216# module tests will only compile with gcc15 or clang20 and above
1317if (CMAKE_CXX_SCAN_FOR_MODULES)
14- set (ALL_TESTNAMES
15- scope_success
16- scope_exit
17- scope_fail
18- unique_resource
19- module
20- )
21- else ()
22- set (ALL_TESTNAMES scope_success scope_exit scope_fail unique_resource)
18+ list (APPEND ALL_TESTNAMES module)
2319endif ()
2420
2521message ("Tests to be built: ${ALL_TESTNAMES} " )
You can’t perform that action at this time.
0 commit comments