Skip to content
Snippets Groups Projects
Commit 04fc22a5 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

git subrepo pull --force packages/Catch2

subrepo:
  subdir:   "packages/Catch2"
  merged:   "1078e7e95"
upstream:
  origin:   "git@github.com:catchorg/Catch2.git"
  branch:   "devel"
  commit:   "1078e7e95"
git-subrepo:
  version:  "0.4.6"
  origin:   "git@github.com:ingydotnet/git-subrepo.git"
  commit:   "110b9eb"
parent a3b573d7
Branches
Tags
1 merge request!179git subrepo pull --force packages/CLI11
Showing
with 284 additions and 114 deletions
......@@ -8,3 +8,4 @@ build:vs2022 --cxxopt=/std:c++17
build:windows --config=vs2022
build:linux --config=gcc11
build:macos --cxxopt=-std=c++2b
......@@ -11,7 +11,7 @@ jobs:
compilation_mode: [fastbuild, dbg, opt]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Mount bazel cache
uses: actions/cache@v3
......
......@@ -18,10 +18,12 @@ jobs:
other_pkgs: clang-11
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Prepare environment
run: sudo apt-get install -y meson ninja-build ${{matrix.other_pkgs}}
run: |
sudo apt-get update
sudo apt-get install -y meson ninja-build ${{matrix.other_pkgs}}
- name: Configure build
env:
......@@ -38,6 +40,5 @@ jobs:
- name: Run tests
working-directory: ${{runner.workspace}}/meson-build
# Hardcode 2 cores we know are there
run: |
meson test --verbose
......@@ -29,13 +29,13 @@ jobs:
build_type: Debug
std: 14
other_pkgs: g++-7
cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON
cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
- cxx: g++-7
build_description: Extras + Examples
build_type: Release
std: 14
other_pkgs: g++-7
cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON
cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
# Extras and examples with Clang-10
- cxx: clang++-10
......@@ -43,13 +43,13 @@ jobs:
build_type: Debug
std: 17
other_pkgs: clang-10
cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON
cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
- cxx: clang++-10
build_description: Extras + Examples
build_type: Release
std: 17
other_pkgs: clang-10
cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON
cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
# Configure tests with Clang-10
- cxx: clang++-10
......@@ -70,10 +70,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Prepare environment
run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}}
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ${{matrix.other_pkgs}}
- name: Configure build
working-directory: ${{runner.workspace}}
......@@ -100,5 +102,4 @@ jobs:
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
# Hardcode 2 cores we know are there
run: ctest -C ${{matrix.build_type}} -j 2 ${{matrix.other_ctest_args}}
run: ctest -C ${{matrix.build_type}} -j `nproc` ${{matrix.other_ctest_args}}
......@@ -83,7 +83,7 @@ jobs:
other_pkgs: g++-10
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Add repositories for older GCC
run: |
......@@ -92,7 +92,9 @@ jobs:
if: ${{ matrix.cxx == 'g++-5' || matrix.cxx == 'g++-6' }}
- name: Prepare environment
run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}}
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ${{matrix.other_pkgs}}
- name: Configure build
working-directory: ${{runner.workspace}}
......@@ -118,5 +120,4 @@ jobs:
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
# Hardcode 2 cores we know are there
run: ctest -C ${{matrix.build_type}} -j 2
run: ctest -C ${{matrix.build_type}} -j `nproc`
......@@ -22,7 +22,7 @@ jobs:
extra_tests: ON
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure build
working-directory: ${{runner.workspace}}
......@@ -42,11 +42,10 @@ jobs:
- name: Build tests + lib
working-directory: ${{runner.workspace}}/build
run: make -j 2
run: make -j `sysctl -n hw.ncpu`
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
# Hardcode 2 cores we know are there
run: ctest -C ${{matrix.build_type}} -j 2
run: ctest -C ${{matrix.build_type}} -j `sysctl -n hw.ncpu`
......@@ -9,7 +9,7 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Dependencies
uses: actions/setup-python@v2
......
......@@ -13,7 +13,7 @@ jobs:
build_type: [Debug, Release]
std: [14, 17]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure build
working-directory: ${{runner.workspace}}
......
......@@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:catchorg/Catch2.git
branch = devel
commit = 0631b607ee2bbc07c7c238f0b15b23ef21926960
parent = 446a6502fc29873ba84cd5964ea2e0787dc48e49
commit = 1078e7e95b3a06d4dadc75188de48bc4afffb955
parent = a3b573d7e88e70c258be089529fd58ad41a10a64
method = merge
cmdver = 0.4.6
......@@ -49,6 +49,7 @@ expand_template(
"#cmakedefine CATCH_CONFIG_NOSTDOUT": "",
"#cmakedefine CATCH_CONFIG_POSIX_SIGNALS": "",
"#cmakedefine CATCH_CONFIG_PREFIX_ALL": "",
"#cmakedefine CATCH_CONFIG_PREFIX_MESSAGES": "",
"#cmakedefine CATCH_CONFIG_SHARED_LIBRARY": "",
"#cmakedefine CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT": "",
"#cmakedefine CATCH_CONFIG_USE_ASYNC": "",
......
......@@ -18,10 +18,12 @@
macro(AddOverridableConfigOption OptionBaseName)
option(CATCH_CONFIG_${OptionBaseName} "Read docs/configuration.md for details" OFF)
option(CATCH_CONFIG_NO_${OptionBaseName} "Read docs/configuration.md for details" OFF)
mark_as_advanced(CATCH_CONFIG_${OptionBaseName} CATCH_CONFIG_NO_${OptionBaseName})
endmacro()
macro(AddConfigOption OptionBaseName)
option(CATCH_CONFIG_${OptionBaseName} "Read docs/configuration.md for details" OFF)
mark_as_advanced(CATCH_CONFIG_${OptionBaseName})
endmacro()
set(_OverridableOptions
......@@ -62,6 +64,7 @@ set(_OtherConfigOptions
"FAST_COMPILE"
"NOSTDOUT"
"PREFIX_ALL"
"PREFIX_MESSAGES"
"WINDOWS_CRTDBG"
)
......@@ -78,6 +81,8 @@ endif()
set(CATCH_CONFIG_DEFAULT_REPORTER "console" CACHE STRING "Read docs/configuration.md for details. The name of the reporter should be without quotes.")
set(CATCH_CONFIG_CONSOLE_WIDTH "80" CACHE STRING "Read docs/configuration.md for details. Must form a valid integer literal.")
mark_as_advanced(CATCH_CONFIG_SHARED_LIBRARY CATCH_CONFIG_DEFAULT_REPORTER CATCH_CONFIG_CONSOLE_WIDTH)
# There is no good way to both turn this into a CMake cache variable,
# and keep reasonable default semantics inside the project. Thus we do
# not define it and users have to provide it as an outside variable.
......
......@@ -46,7 +46,6 @@ function(add_warnings_to_targets targets)
set(CHECKED_WARNING_FLAGS
"-Wabsolute-value"
"-Wall"
"-Wc++20-compat"
"-Wcall-to-pure-virtual-from-ctor-dtor"
"-Wcast-align"
"-Wcatch-value"
......@@ -79,6 +78,7 @@ function(add_warnings_to_targets targets)
"-Wreturn-std-move"
"-Wshadow"
"-Wstrict-aliasing"
"-Wsubobject-linkage"
"-Wsuggest-destructor-override"
"-Wsuggest-override"
"-Wundef"
......
......@@ -11,6 +11,7 @@ endif()
option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON)
option(CATCH_INSTALL_EXTRAS "Install extras (CMake scripts, debugger helpers) alongside library" ON)
option(CATCH_DEVELOPMENT_BUILD "Build tests, enable warnings, enable Werror, etc" OFF)
option(CATCH_ENABLE_REPRODUCIBLE_BUILD "Add compiler flags for improving build reproducibility" ON)
include(CMakeDependentOption)
cmake_dependent_option(CATCH_BUILD_TESTING "Build the SelfTest project" ON "CATCH_DEVELOPMENT_BUILD" OFF)
......@@ -21,6 +22,7 @@ cmake_dependent_option(CATCH_ENABLE_COVERAGE "Generate coverage for codecov.io"
cmake_dependent_option(CATCH_ENABLE_WERROR "Enables Werror during build" ON "CATCH_DEVELOPMENT_BUILD" OFF)
cmake_dependent_option(CATCH_BUILD_SURROGATES "Enable generating and building surrogate TUs for the main headers" OFF "CATCH_DEVELOPMENT_BUILD" OFF)
cmake_dependent_option(CATCH_ENABLE_CONFIGURE_TESTS "Enable CMake configuration tests. WARNING: VERY EXPENSIVE" OFF "CATCH_DEVELOPMENT_BUILD" OFF)
cmake_dependent_option(CATCH_ENABLE_CMAKE_HELPER_TESTS "Enable CMake helper tests. WARNING: VERY EXPENSIVE" OFF "CATCH_DEVELOPMENT_BUILD" OFF)
# Catch2's build breaks if done in-tree. You probably should not build
......@@ -31,7 +33,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()
project(Catch2
VERSION 3.3.2 # CML version placeholder, don't delete
VERSION 3.5.2 # CML version placeholder, don't delete
LANGUAGES CXX
# HOMEPAGE_URL is not supported until CMake version 3.12, which
# we do not target yet.
......
......@@ -18,7 +18,8 @@
"CATCH_BUILD_EXAMPLES": "ON",
"CATCH_BUILD_EXTRA_TESTS": "ON",
"CATCH_BUILD_SURROGATES": "ON",
"CATCH_ENABLE_CONFIGURE_TESTS": "ON"
"CATCH_ENABLE_CONFIGURE_TESTS": "ON",
"CATCH_ENABLE_CMAKE_HELPER_TESTS": "ON"
}
}
]
......
This diff is collapsed.
module(name = "catch2")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
......@@ -4,10 +4,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_skylib",
sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
],
)
......
......@@ -70,14 +70,3 @@ environment:
additional_flags: "/permissive- /std:c++latest"
platform: x64
configuration: Debug
- FLAVOR: VS 2017 x64 Debug
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x64
configuration: Debug
- FLAVOR: VS 2017 x64 Release Coverage
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
coverage: 1
platform: x64
configuration: Debug
\ No newline at end of file
......@@ -93,7 +93,7 @@ Fibonacci
-------------------------------------------------------------------------------
C:\path\to\Catch2\Benchmark.tests.cpp(10)
...............................................................................
benchmark name samples iterations estimated
benchmark name samples iterations est run time
mean low mean high mean
std dev low std dev high std dev
-------------------------------------------------------------------------------
......
......@@ -82,7 +82,7 @@ variable set to "1".
### CodeCoverage module (GCOV, LCOV...)
If you are using GCOV tool to get testing coverage of your code, and are not sure how to integrate it with CMake and Catch, there should be an external example over at https://github.com/fkromer/catch_cmake_coverage
If you are using GCOV tool to get testing coverage of your code, and are not sure how to integrate it with CMake and Catch, there should be an external example over at https://github.com/claremacrae/catch_cmake_coverage
### pkg-config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment