-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '6eeeacc036d80fbabbfcd6bd3e4a527ae4d8c2f5' into catch2-u…
…pgrade
- Loading branch information
Showing
286 changed files
with
17,980 additions
and
6,820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
# Note: Alas, `Checks` is a string, not an array. | ||
# Comments in the block string are not parsed and are passed in the value. | ||
# They must thus be delimited by ',' from either side - then they are | ||
# harmless. It's terrible, but it works. | ||
Checks: >- | ||
clang-diagnostic-*, | ||
clang-analyzer-*, | ||
-clang-analyzer-optin.core.EnumCastOutOfRange, | ||
bugprone-*, | ||
-bugprone-unchecked-optional-access, | ||
,# This is ridiculous, as it triggers on constants, | ||
-bugprone-implicit-widening-of-multiplication-result, | ||
-bugprone-easily-swappable-parameters, | ||
,# Is not really useful, has false positives, triggers for no-noexcept move constructors ..., | ||
-bugprone-exception-escape, | ||
-bugprone-narrowing-conversions, | ||
-bugprone-chained-comparison,# RIP decomposers, | ||
modernize-*, | ||
-modernize-avoid-c-arrays, | ||
-modernize-use-auto, | ||
-modernize-use-emplace, | ||
-modernize-use-nullptr,# it went crazy with three-way comparison operators, | ||
-modernize-use-trailing-return-type, | ||
-modernize-return-braced-init-list, | ||
-modernize-concat-nested-namespaces, | ||
-modernize-use-nodiscard, | ||
-modernize-use-default-member-init, | ||
-modernize-type-traits,# we need to support C++14, | ||
-modernize-deprecated-headers, | ||
,# There's a lot of these and most of them are probably not useful, | ||
-modernize-pass-by-value, | ||
performance-*, | ||
-performance-enum-size, | ||
portability-*, | ||
readability-*, | ||
-readability-braces-around-statements, | ||
-readability-container-size-empty, | ||
-readability-convert-member-functions-to-static, | ||
-readability-else-after-return, | ||
-readability-function-cognitive-complexity, | ||
-readability-function-size, | ||
-readability-identifier-length, | ||
-readability-implicit-bool-conversion, | ||
-readability-isolate-declaration, | ||
-readability-magic-numbers, | ||
-readability-named-parameter, | ||
-readability-qualified-auto, | ||
-readability-redundant-access-specifiers, | ||
-readability-simplify-boolean-expr, | ||
-readability-static-definition-in-anonymous-namespace, | ||
-readability-uppercase-literal-suffix, | ||
-readability-use-anyofallof, | ||
-readability-avoid-return-with-void-value, | ||
,# time hogs, | ||
-bugprone-throw-keyword-missing, | ||
-modernize-replace-auto-ptr, | ||
-readability-identifier-naming, | ||
,# We cannot use this until clang-tidy supports custom unique_ptr, | ||
-bugprone-use-after-move, | ||
,# Doesn't recognize unevaluated context in CATCH_MOVE and CATCH_FORWARD, | ||
-bugprone-macro-repeated-side-effects, | ||
WarningsAsErrors: >- | ||
clang-analyzer-core.*, | ||
clang-analyzer-cplusplus.*, | ||
clang-analyzer-security.*, | ||
clang-analyzer-unix.*, | ||
performance-move-const-arg, | ||
performance-unnecessary-value-param, | ||
readability-duplicate-include, | ||
HeaderFilterRegex: '.*\.(c|cxx|cpp)$' | ||
FormatStyle: none | ||
CheckOptions: {} | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.2.0) | ||
project(test_package CXX) | ||
cmake_minimum_required(VERSION 3.15) | ||
project(PackageTest CXX) | ||
|
||
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") | ||
conan_basic_setup() | ||
find_package(Catch2 CONFIG REQUIRED) | ||
|
||
find_package(Catch2 REQUIRED CONFIG) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
|
||
target_link_libraries(${PROJECT_NAME} Catch2::Catch2WithMain) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14) | ||
add_executable(test_package test_package.cpp) | ||
target_link_libraries(test_package Catch2::Catch2WithMain) | ||
target_compile_features(test_package PRIVATE cxx_std_14) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
from conans import ConanFile, CMake | ||
from conan import ConanFile | ||
from conan.tools.cmake import CMake, cmake_layout | ||
from conan.tools.build import can_run | ||
from conan.tools.files import save, load | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake_find_package_multi", "cmake" | ||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def generate(self): | ||
save(self, os.path.join(self.build_folder, "package_folder"), | ||
self.dependencies[self.tested_reference_str].package_folder) | ||
save(self, os.path.join(self.build_folder, "license"), | ||
self.dependencies[self.tested_reference_str].license) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
assert os.path.isfile(os.path.join( | ||
self.deps_cpp_info["catch2"].rootpath, "licenses", "LICENSE.txt")) | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run("%s -s" % bin_path, run_environment=True) | ||
if can_run(self): | ||
cmd = os.path.join(self.cpp.build.bindir, "test_package") | ||
self.run(cmd, env="conanrun") | ||
|
||
package_folder = load(self, os.path.join(self.build_folder, "package_folder")) | ||
license = load(self, os.path.join(self.build_folder, "license")) | ||
assert os.path.isfile(os.path.join(package_folder, "licenses", "LICENSE.txt")) | ||
assert license == 'BSL-1.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: M1 Mac builds | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-14 | ||
strategy: | ||
matrix: | ||
cxx: | ||
- clang++ | ||
build_type: [Debug, Release] | ||
std: [14, 17] | ||
include: | ||
- build_type: Debug | ||
examples: ON | ||
extra_tests: ON | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Configure build | ||
working-directory: ${{runner.workspace}} | ||
env: | ||
CXX: ${{matrix.cxx}} | ||
CXXFLAGS: ${{matrix.cxxflags}} | ||
run: | | ||
cmake -Bbuild -H$GITHUB_WORKSPACE \ | ||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ | ||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \ | ||
-DCMAKE_CXX_STANDARD_REQUIRED=ON \ | ||
-DCATCH_DEVELOPMENT_BUILD=ON \ | ||
-DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \ | ||
-DCATCH_BUILD_EXTRA_TESTS=${{matrix.examples}} | ||
- name: Build tests + lib | ||
working-directory: ${{runner.workspace}}/build | ||
run: make -j `sysctl -n hw.ncpu` | ||
|
||
- name: Run tests | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
working-directory: ${{runner.workspace}}/build | ||
run: ctest -C ${{matrix.build_type}} -j `sysctl -n hw.ncpu` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.