mirror of
https://github.com/catchorg/Catch2.git
synced 2025-12-20 00:52:11 +01:00
Compare commits
7 Commits
devel-cond
...
devel-new-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b25dff20c7 | ||
|
|
97091636d0 | ||
|
|
f80956a43a | ||
|
|
32eac2d1bb | ||
|
|
e849735e11 | ||
|
|
d26f763180 | ||
|
|
5e44382423 |
4
.github/workflows/mac-builds.yml
vendored
4
.github/workflows/mac-builds.yml
vendored
@@ -4,13 +4,11 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# From macos-14 forward, the baseline "macos-X" image is Arm based,
|
|
||||||
# and not Intel based.
|
|
||||||
runs-on: ${{matrix.image}}
|
runs-on: ${{matrix.image}}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [macos-13, macos-14, macos-15]
|
image: [macos-15, macos-15-intel]
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
std: [14, 17]
|
std: [14, 17]
|
||||||
|
|
||||||
|
|||||||
36
.github/workflows/mac-other-builds.yml
vendored
36
.github/workflows/mac-other-builds.yml
vendored
@@ -1,36 +0,0 @@
|
|||||||
name: Mac Sanitizer Builds
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CXXFLAGS: -fsanitize=thread,undefined
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
# From macos-14 forward, the baseline "macos-X" image is Arm based,
|
|
||||||
# and not Intel based.
|
|
||||||
runs-on: ${{matrix.image}}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
image: [macos-13, macos-14]
|
|
||||||
build_type: [Debug, Release]
|
|
||||||
std: [14, 17]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure
|
|
||||||
|
|
||||||
run: |
|
|
||||||
cmake --preset all-tests -GNinja \
|
|
||||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
|
||||||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
|
||||||
-DCATCH_BUILD_EXTRA_TESTS=ON \
|
|
||||||
-DCATCH_ENABLE_WERROR=OFF
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: ctest --test-dir build -R ThreadSafetyTests --timeout 21600 --verbose
|
|
||||||
@@ -164,7 +164,9 @@ namespace {
|
|||||||
#if defined( CATCH_PLATFORM_LINUX ) \
|
#if defined( CATCH_PLATFORM_LINUX ) \
|
||||||
|| defined( CATCH_PLATFORM_MAC ) \
|
|| defined( CATCH_PLATFORM_MAC ) \
|
||||||
|| defined( __GLIBC__ ) \
|
|| defined( __GLIBC__ ) \
|
||||||
|| defined( __FreeBSD__ ) \
|
|| (defined( __FreeBSD__ ) \
|
||||||
|
/* PlayStation platform does not have `isatty()` */ \
|
||||||
|
&& !defined(CATCH_PLATFORM_PLAYSTATION)) \
|
||||||
|| defined( CATCH_PLATFORM_QNX )
|
|| defined( CATCH_PLATFORM_QNX )
|
||||||
# define CATCH_INTERNAL_HAS_ISATTY
|
# define CATCH_INTERNAL_HAS_ISATTY
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
|
|||||||
@@ -175,11 +175,11 @@ namespace Catch {
|
|||||||
// below, in the future we will want to allocate piece of memory
|
// below, in the future we will want to allocate piece of memory
|
||||||
// from heap, to avoid consuming too much thread-local storage.
|
// from heap, to avoid consuming too much thread-local storage.
|
||||||
//
|
//
|
||||||
// Note that we also don't want the thread-local variables below
|
// Note that we also don't want non-trivial the thread-local variables
|
||||||
// be initialized for every thread, only for those that touch Catch2.
|
// below be initialized for every thread, only for those that touch
|
||||||
// To make this work with both GCC/Clang and MSVC, we have to make
|
// Catch2. To make this work with both GCC/Clang and MSVC, we have to
|
||||||
// them thread-local magic statics. (Class-level statics have
|
// make them thread-local magic statics. (Class-level statics have the
|
||||||
// the desired semantics on GCC, but not on MSVC).
|
// desired semantics on GCC, but not on MSVC).
|
||||||
|
|
||||||
// This is used for the "if" part of CHECKED_IF/CHECKED_ELSE
|
// This is used for the "if" part of CHECKED_IF/CHECKED_ELSE
|
||||||
static CATCH_INTERNAL_THREAD_LOCAL bool g_lastAssertionPassed = false;
|
static CATCH_INTERNAL_THREAD_LOCAL bool g_lastAssertionPassed = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user