mirror of
https://github.com/catchorg/Catch2.git
synced 2025-12-15 14:42:12 +01:00
Compare commits
9 Commits
devel
...
devel-cond
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
036448b4b2 | ||
|
|
24e305b83e | ||
|
|
15d4eb2ebe | ||
|
|
e075e04cde | ||
|
|
d427034253 | ||
|
|
1e463608ef | ||
|
|
2c381a8819 | ||
|
|
32bf7b2330 | ||
|
|
86267a7c6d |
36
.github/workflows/mac-other-builds.yml
vendored
Normal file
36
.github/workflows/mac-other-builds.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
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,9 +164,7 @@ namespace {
|
||||
#if defined( CATCH_PLATFORM_LINUX ) \
|
||||
|| defined( CATCH_PLATFORM_MAC ) \
|
||||
|| defined( __GLIBC__ ) \
|
||||
|| (defined( __FreeBSD__ ) \
|
||||
/* PlayStation platform does not have `isatty()` */ \
|
||||
&& !defined(CATCH_PLATFORM_PLAYSTATION)) \
|
||||
|| defined( __FreeBSD__ ) \
|
||||
|| defined( CATCH_PLATFORM_QNX )
|
||||
# define CATCH_INTERNAL_HAS_ISATTY
|
||||
# include <unistd.h>
|
||||
|
||||
@@ -175,11 +175,11 @@ namespace Catch {
|
||||
// below, in the future we will want to allocate piece of memory
|
||||
// from heap, to avoid consuming too much thread-local storage.
|
||||
//
|
||||
// Note that we also don't want non-trivial the thread-local variables
|
||||
// below be initialized for every thread, only for those that touch
|
||||
// Catch2. To make this work with both GCC/Clang and MSVC, we have to
|
||||
// make them thread-local magic statics. (Class-level statics have the
|
||||
// desired semantics on GCC, but not on MSVC).
|
||||
// Note that we also don't want the thread-local variables below
|
||||
// be initialized for every thread, only for those that touch Catch2.
|
||||
// To make this work with both GCC/Clang and MSVC, we have to make
|
||||
// them thread-local magic statics. (Class-level statics have
|
||||
// the desired semantics on GCC, but not on MSVC).
|
||||
|
||||
// This is used for the "if" part of CHECKED_IF/CHECKED_ELSE
|
||||
static CATCH_INTERNAL_THREAD_LOCAL bool g_lastAssertionPassed = false;
|
||||
|
||||
Reference in New Issue
Block a user