Skip to content

Commit f9a584a

Browse files
committed
update imports
1 parent 661bc12 commit f9a584a

File tree

10,488 files changed

+303479
-128372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

10,488 files changed

+303479
-128372
lines changed

external_imported/Catch2/.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Enable Bzlmod for every Bazel command
2+
common --enable_bzlmod
3+
14
build --enable_platform_specific_config
25

36
build:gcc9 --cxxopt=-std=c++2a

external_imported/Catch2/.clang-tidy

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
# Note: Alas, `Checks` is a string, not an array.
3+
# Comments in the block string are not parsed and are passed in the value.
4+
# They must thus be delimited by ',' from either side - then they are
5+
# harmless. It's terrible, but it works.
6+
Checks: >-
7+
clang-diagnostic-*,
8+
clang-analyzer-*,
9+
-clang-analyzer-optin.core.EnumCastOutOfRange,
10+
11+
bugprone-*,
12+
-bugprone-unchecked-optional-access,
13+
,# This is ridiculous, as it triggers on constants,
14+
-bugprone-implicit-widening-of-multiplication-result,
15+
-bugprone-easily-swappable-parameters,
16+
,# Is not really useful, has false positives, triggers for no-noexcept move constructors ...,
17+
-bugprone-exception-escape,
18+
-bugprone-narrowing-conversions,
19+
-bugprone-chained-comparison,# RIP decomposers,
20+
21+
modernize-*,
22+
-modernize-avoid-c-arrays,
23+
-modernize-use-auto,
24+
-modernize-use-emplace,
25+
-modernize-use-nullptr,# it went crazy with three-way comparison operators,
26+
-modernize-use-trailing-return-type,
27+
-modernize-return-braced-init-list,
28+
-modernize-concat-nested-namespaces,
29+
-modernize-use-nodiscard,
30+
-modernize-use-default-member-init,
31+
-modernize-type-traits,# we need to support C++14,
32+
-modernize-deprecated-headers,
33+
,# There's a lot of these and most of them are probably not useful,
34+
-modernize-pass-by-value,
35+
36+
performance-*,
37+
performance-enum-size,
38+
39+
portability-*,
40+
41+
readability-*,
42+
-readability-braces-around-statements,
43+
-readability-container-size-empty,
44+
-readability-convert-member-functions-to-static,
45+
-readability-else-after-return,
46+
-readability-function-cognitive-complexity,
47+
-readability-function-size,
48+
-readability-identifier-length,
49+
-readability-implicit-bool-conversion,
50+
-readability-isolate-declaration,
51+
-readability-magic-numbers,
52+
-readability-math-missing-parentheses, #no, 'a + B * C' obeying math rules is not confusing,
53+
-readability-named-parameter,
54+
-readability-qualified-auto,
55+
-readability-redundant-access-specifiers,
56+
-readability-simplify-boolean-expr,
57+
-readability-static-definition-in-anonymous-namespace,
58+
-readability-uppercase-literal-suffix,
59+
-readability-use-anyofallof,
60+
-readability-avoid-return-with-void-value,
61+
62+
,# time hogs,
63+
-bugprone-throw-keyword-missing,
64+
-modernize-replace-auto-ptr,
65+
-readability-identifier-naming,
66+
67+
,# We cannot use this until clang-tidy supports custom unique_ptr,
68+
-bugprone-use-after-move,
69+
,# Doesn't recognize unevaluated context in CATCH_MOVE and CATCH_FORWARD,
70+
-bugprone-macro-repeated-side-effects,
71+
WarningsAsErrors: >-
72+
clang-analyzer-core.*,
73+
clang-analyzer-cplusplus.*,
74+
clang-analyzer-security.*,
75+
clang-analyzer-unix.*,
76+
performance-move-const-arg,
77+
performance-unnecessary-value-param,
78+
readability-duplicate-include,
79+
HeaderFilterRegex: '.*\.(c|cxx|cpp)$'
80+
FormatStyle: none
81+
CheckOptions: {}
82+
...
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
cmake_minimum_required(VERSION 3.2.0)
2-
project(test_package CXX)
1+
cmake_minimum_required(VERSION 3.16)
2+
project(PackageTest CXX)
33

4-
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
5-
conan_basic_setup()
4+
find_package(Catch2 CONFIG REQUIRED)
65

7-
find_package(Catch2 REQUIRED CONFIG)
8-
9-
add_executable(${PROJECT_NAME} test_package.cpp)
10-
11-
target_link_libraries(${PROJECT_NAME} Catch2::Catch2WithMain)
12-
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14)
6+
add_executable(test_package test_package.cpp)
7+
target_link_libraries(test_package Catch2::Catch2WithMain)
8+
target_compile_features(test_package PRIVATE cxx_std_14)
Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,40 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
from conans import ConanFile, CMake
3+
from conan import ConanFile
4+
from conan.tools.cmake import CMake, cmake_layout
5+
from conan.tools.build import can_run
6+
from conan.tools.files import save, load
47
import os
58

69

710
class TestPackageConan(ConanFile):
811
settings = "os", "compiler", "build_type", "arch"
9-
generators = "cmake_find_package_multi", "cmake"
12+
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
13+
test_type = "explicit"
14+
15+
def requirements(self):
16+
self.requires(self.tested_reference_str)
17+
18+
def layout(self):
19+
cmake_layout(self)
20+
21+
def generate(self):
22+
save(self, os.path.join(self.build_folder, "package_folder"),
23+
self.dependencies[self.tested_reference_str].package_folder)
24+
save(self, os.path.join(self.build_folder, "license"),
25+
self.dependencies[self.tested_reference_str].license)
1026

1127
def build(self):
1228
cmake = CMake(self)
1329
cmake.configure()
1430
cmake.build()
1531

1632
def test(self):
17-
assert os.path.isfile(os.path.join(
18-
self.deps_cpp_info["catch2"].rootpath, "licenses", "LICENSE.txt"))
19-
bin_path = os.path.join("bin", "test_package")
20-
self.run("%s -s" % bin_path, run_environment=True)
33+
if can_run(self):
34+
cmd = os.path.join(self.cpp.build.bindir, "test_package")
35+
self.run(cmd, env="conanrun")
36+
37+
package_folder = load(self, os.path.join(self.build_folder, "package_folder"))
38+
license = load(self, os.path.join(self.build_folder, "license"))
39+
assert os.path.isfile(os.path.join(package_folder, "licenses", "LICENSE.txt"))
40+
assert license == 'BSL-1.0'

external_imported/Catch2/.github/workflows/linux-meson-builds.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,5 @@ jobs:
4040

4141
- name: Run tests
4242
working-directory: ${{runner.workspace}}/meson-build
43-
# Hardcode 2 cores we know are there
4443
run: |
4544
meson test --verbose

external_imported/Catch2/.github/workflows/linux-other-builds.yml

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,53 @@ jobs:
102102
env:
103103
CTEST_OUTPUT_ON_FAILURE: 1
104104
working-directory: ${{runner.workspace}}/build
105-
# Hardcode 2 cores we know are there
106-
run: ctest -C ${{matrix.build_type}} -j 2 ${{matrix.other_ctest_args}}
105+
run: ctest -C ${{matrix.build_type}} -j `nproc` ${{matrix.other_ctest_args}}
106+
clang-tidy:
107+
name: clang-tidy ${{matrix.version}}, ${{matrix.build_description}}, C++${{matrix.std}} ${{matrix.build_type}}
108+
runs-on: ubuntu-22.04
109+
strategy:
110+
matrix:
111+
include:
112+
- version: "15"
113+
build_description: all
114+
build_type: Debug
115+
std: 17
116+
other_pkgs: ''
117+
cmake_configurations: -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
118+
steps:
119+
- uses: actions/checkout@v4
120+
121+
- name: Prepare environment
122+
run: |
123+
sudo apt-get update
124+
sudo apt-get install -y ninja-build clang-${{matrix.version}} clang-tidy-${{matrix.version}} ${{matrix.other_pkgs}}
125+
126+
- name: Configure build
127+
working-directory: ${{runner.workspace}}
128+
env:
129+
CXX: clang++-${{matrix.version}}
130+
CXXFLAGS: ${{matrix.cxxflags}}
131+
# Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}.
132+
# This is important
133+
run: |
134+
clangtidy="clang-tidy-${{matrix.version}};-use-color"
135+
# Use a dummy compiler/linker/ar/ranlib to effectively disable the
136+
# compilation and only run clang-tidy.
137+
cmake -Bbuild -H$GITHUB_WORKSPACE \
138+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
139+
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
140+
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
141+
-DCMAKE_CXX_EXTENSIONS=OFF \
142+
-DCATCH_DEVELOPMENT_BUILD=ON \
143+
-DCMAKE_CXX_CLANG_TIDY="$clangtidy" \
144+
-DCMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/true \
145+
-DCMAKE_AR=/usr/bin/true \
146+
-DCMAKE_CXX_COMPILER_AR=/usr/bin/true \
147+
-DCMAKE_RANLIB=/usr/bin/true \
148+
-DCMAKE_CXX_LINK_EXECUTABLE=/usr/bin/true \
149+
${{matrix.cmake_configurations}} \
150+
-G Ninja
151+
152+
- name: Run clang-tidy
153+
working-directory: ${{runner.workspace}}/build
154+
run: ninja

external_imported/Catch2/.github/workflows/linux-simple-builds.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,4 @@ jobs:
120120
env:
121121
CTEST_OUTPUT_ON_FAILURE: 1
122122
working-directory: ${{runner.workspace}}/build
123-
# Hardcode 2 cores we know are there
124-
run: ctest -C ${{matrix.build_type}} -j 2
123+
run: ctest -C ${{matrix.build_type}} -j `nproc`
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Arm Mac builds
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: macos-14
8+
strategy:
9+
matrix:
10+
cxx:
11+
- clang++
12+
build_type: [Debug, Release]
13+
std: [14, 17]
14+
include:
15+
- build_type: Debug
16+
examples: ON
17+
extra_tests: ON
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Configure build
23+
working-directory: ${{runner.workspace}}
24+
env:
25+
CXX: ${{matrix.cxx}}
26+
CXXFLAGS: ${{matrix.cxxflags}}
27+
run: |
28+
cmake -Bbuild -H$GITHUB_WORKSPACE \
29+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
30+
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
31+
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
32+
-DCATCH_DEVELOPMENT_BUILD=ON \
33+
-DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \
34+
-DCATCH_BUILD_EXTRA_TESTS=${{matrix.examples}}
35+
36+
- name: Build tests + lib
37+
working-directory: ${{runner.workspace}}/build
38+
run: make -j `sysctl -n hw.ncpu`
39+
40+
- name: Run tests
41+
env:
42+
CTEST_OUTPUT_ON_FAILURE: 1
43+
working-directory: ${{runner.workspace}}/build
44+
run: ctest -C ${{matrix.build_type}} -j `sysctl -n hw.ncpu`

external_imported/Catch2/.github/workflows/mac-builds.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
name: Mac builds
1+
name: Intel Mac builds
22

33
on: [push, pull_request]
44

55
jobs:
66
build:
7-
# macos-12 updated to a toolchain that crashes when linking the
8-
# test binary. This seems to be a known bug in that version,
9-
# and will eventually get fixed in an update. After that, we can go
10-
# back to newer macos images.
11-
runs-on: macos-11
7+
# From macos-14 forward, the baseline "macos-X" image is Arm based,
8+
# and not Intel based. Thus this is the newest image we can use for
9+
# Intel MacOS CI, and there don't seem to be any plans to keep providing
10+
# the Intel based images for free to OSS projects.
11+
runs-on: macos-13
1212
strategy:
1313
matrix:
1414
cxx:
15-
- g++-11
1615
- clang++
1716
build_type: [Debug, Release]
1817
std: [14, 17]
@@ -29,8 +28,6 @@ jobs:
2928
env:
3029
CXX: ${{matrix.cxx}}
3130
CXXFLAGS: ${{matrix.cxxflags}}
32-
# Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}.
33-
# This is important
3431
run: |
3532
cmake -Bbuild -H$GITHUB_WORKSPACE \
3633
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Package Manager Builds
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
conan_builds:
7+
name: Conan ${{matrix.conan_version}}
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
matrix:
11+
conan_version:
12+
- '1.63'
13+
- '2.1'
14+
15+
include:
16+
# Conan 1 has default profiles installed
17+
- conan_version: '1.63'
18+
profile_generate: 'false'
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Install conan
24+
run: pip install conan==${{matrix.conan_version}}
25+
26+
- name: Setup conan profiles
27+
if: matrix.profile_generate != 'false'
28+
run: conan profile detect
29+
30+
- name: Run conan package create
31+
run: conan create . -tf .conan/test_package

0 commit comments

Comments
 (0)