Skip to content

Commit 70941a2

Browse files
ax3lhorenmar
andauthored
Catch2 v2.13.10 (#1344)
Update to the latest Catch2 release. Mostly small MSVC bug fixes. Co-authored-by: Martin Hořeňovský <[email protected]> Co-authored-by: Martin Hořeňovský <[email protected]>
1 parent bbf4bff commit 70941a2

File tree

7 files changed

+30
-24
lines changed

7 files changed

+30
-24
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Bug Fixes
2626

2727
Other
2828
"""""
29-
- Catch2: updated to 2.13.9 #1299
29+
- Catch2: updated to 2.13.10 #1299 #...
3030

3131

3232
0.14.3

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,9 @@ if(openPMD_BUILD_TESTING)
532532
target_include_directories(openPMD::thirdparty::Catch2 SYSTEM INTERFACE
533533
$<BUILD_INTERFACE:${openPMD_SOURCE_DIR}/share/openPMD/thirdParty/catch2/include>
534534
)
535-
message(STATUS "Catch2: Using INTERNAL version '2.13.9'")
535+
message(STATUS "Catch2: Using INTERNAL version '2.13.10'")
536536
else()
537-
find_package(Catch2 2.13.9 REQUIRED CONFIG)
537+
find_package(Catch2 2.13.10 REQUIRED CONFIG)
538538
target_link_libraries(openPMD::thirdparty::Catch2
539539
INTERFACE Catch2::Catch2)
540540
message(STATUS "Catch2: Found version '${Catch2_VERSION}'")

NEWS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Building openPMD-api now requires a compiler that supports C++17 or newer.
1212
Python 3.10 & 3.11 are now supported, Python 3.6 is removed.
1313
openPMD-api now depends on `toml11 <https://github.com/ToruNiina/toml11>`__ 3.7.1+.
1414
pybind11 2.10.1 is now the minimally supported version for Python support.
15-
Catch2 2.13.9 is now the minimally supported version for tests.
15+
Catch2 2.13.10 is now the minimally supported version for tests.
1616

1717
The following backend-specific members of the ``Dataset`` class have been removed: ``Dataset::setChunkSize()``, ``Dataset::setCompression()``, ``Dataset::setCustomTransform()``, ``Dataset::chunkSize``, ``Dataset::compression``, ``Dataset::transform``.
1818
They are replaced by backend-specific options in the JSON-based backend configuration.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Required:
103103
* C++17 capable compiler, e.g., g++ 7+, clang 7+, MSVC 19.15+, icpc 19+, icpx
104104

105105
Shipped internally in `share/openPMD/thirdParty/`:
106-
* [Catch2](https://github.com/catchorg/Catch2) 2.13.9+ ([BSL-1.0](https://github.com/catchorg/Catch2/blob/master/LICENSE.txt))
106+
* [Catch2](https://github.com/catchorg/Catch2) 2.13.10+ ([BSL-1.0](https://github.com/catchorg/Catch2/blob/master/LICENSE.txt))
107107
* [pybind11](https://github.com/pybind/pybind11) 2.10.1+ ([new BSD](https://github.com/pybind/pybind11/blob/master/LICENSE))
108108
* [NLohmann-JSON](https://github.com/nlohmann/json) 3.9.1+ ([MIT](https://github.com/nlohmann/json/blob/develop/LICENSE.MIT))
109109
* [toml11](https://github.com/ToruNiina/toml11) 3.7.1+ ([MIT](https://github.com/ToruNiina/toml11/blob/master/LICENSE))
@@ -269,12 +269,12 @@ CMake controls options with prefixed `-D`, e.g. `-DopenPMD_USE_MPI=OFF`:
269269
Additionally, the following libraries are shipped internally.
270270
The following options allow to switch to external installs:
271271

272-
| CMake Option | Values | Library | Version |
273-
|---------------------------------|------------|---------------|---------|
274-
| `openPMD_USE_INTERNAL_CATCH` | **ON**/OFF | Catch2 | 2.13.9+ |
275-
| `openPMD_USE_INTERNAL_PYBIND11` | **ON**/OFF | pybind11 | 2.10.1+ |
276-
| `openPMD_USE_INTERNAL_JSON` | **ON**/OFF | NLohmann-JSON | 3.9.1+ |
277-
| `openPMD_USE_INTERNAL_TOML11` | **ON**/OFF | toml11 | 3.7.1+ |
272+
| CMake Option | Values | Library | Version |
273+
|---------------------------------|------------|---------------|----------|
274+
| `openPMD_USE_INTERNAL_CATCH` | **ON**/OFF | Catch2 | 2.13.10+ |
275+
| `openPMD_USE_INTERNAL_PYBIND11` | **ON**/OFF | pybind11 | 2.10.1+ |
276+
| `openPMD_USE_INTERNAL_JSON` | **ON**/OFF | NLohmann-JSON | 3.9.1+ |
277+
| `openPMD_USE_INTERNAL_TOML11` | **ON**/OFF | toml11 | 3.7.1+ |
278278

279279
By default, this will build as a shared library (`libopenPMD.[so|dylib|dll]`) and installs also its headers.
280280
In order to build a static library, append `-DBUILD_SHARED_LIBS=OFF` to the `cmake` command.

docs/source/dev/buildoptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The following options allow to switch to external installs of dependencies:
6868
================================= =========== ======== ============= ========
6969
CMake Option Values Installs Library Version
7070
================================= =========== ======== ============= ========
71-
``openPMD_USE_INTERNAL_CATCH`` **ON**/OFF No Catch2 2.13.9+
71+
``openPMD_USE_INTERNAL_CATCH`` **ON**/OFF No Catch2 2.13.10+
7272
``openPMD_USE_INTERNAL_PYBIND11`` **ON**/OFF No pybind11 2.10.1+
7373
``openPMD_USE_INTERNAL_JSON`` **ON**/OFF No NLohmann-JSON 3.9.1+
7474
``openPMD_USE_INTERNAL_TOML11`` **ON**/OFF No toml11 3.7.1+

docs/source/dev/dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Shipped internally
1717

1818
The following libraries are shipped internally in ``share/openPMD/thirdParty/`` for convenience:
1919

20-
* `Catch2 <https://github.com/catchorg/Catch2>`_ 2.13.9+ (`BSL-1.0 <https://github.com/catchorg/Catch2/blob/master/LICENSE.txt>`__)
20+
* `Catch2 <https://github.com/catchorg/Catch2>`_ 2.13.10+ (`BSL-1.0 <https://github.com/catchorg/Catch2/blob/master/LICENSE.txt>`__)
2121
* `pybind11 <https://github.com/pybind/pybind11>`_ 2.10.1+ (`new BSD <https://github.com/pybind/pybind11/blob/master/LICENSE>`_)
2222
* `NLohmann-JSON <https://github.com/nlohmann/json>`_ 3.9.1+ (`MIT <https://github.com/nlohmann/json/blob/develop/LICENSE.MIT>`_)
2323
* `toml11 <https://github.com/ToruNiina/toml11>`_ 3.7.1+ (`MIT <https://github.com/ToruNiina/toml11/blob/master/LICENSE>`__)

share/openPMD/thirdParty/catch2/include/catch2/catch.hpp

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Catch v2.13.9
3-
* Generated: 2022-04-12 22:37:23.260201
2+
* Catch v2.13.10
3+
* Generated: 2022-10-16 11:01:23.452308
44
* ----------------------------------------------------------
55
* This file has been merged from multiple headers. Please don't edit it directly
66
* Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved.
@@ -15,7 +15,7 @@
1515

1616
#define CATCH_VERSION_MAJOR 2
1717
#define CATCH_VERSION_MINOR 13
18-
#define CATCH_VERSION_PATCH 9
18+
#define CATCH_VERSION_PATCH 10
1919

2020
#ifdef __clang__
2121
# pragma clang system_header
@@ -7395,8 +7395,6 @@ namespace Catch {
73957395
template <typename T, bool Destruct>
73967396
struct ObjectStorage
73977397
{
7398-
using TStorage = typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type;
7399-
74007398
ObjectStorage() : data() {}
74017399

74027400
ObjectStorage(const ObjectStorage& other)
@@ -7439,7 +7437,7 @@ namespace Catch {
74397437
return *static_cast<T*>(static_cast<void*>(&data));
74407438
}
74417439

7442-
TStorage data;
7440+
struct { alignas(T) unsigned char data[sizeof(T)]; } data;
74437441
};
74447442
}
74457443

@@ -7949,7 +7947,7 @@ namespace Catch {
79497947
#if defined(__i386__) || defined(__x86_64__)
79507948
#define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
79517949
#elif defined(__aarch64__)
7952-
#define CATCH_TRAP() __asm__(".inst 0xd4200000")
7950+
#define CATCH_TRAP() __asm__(".inst 0xd43e0000")
79537951
#endif
79547952

79557953
#elif defined(CATCH_PLATFORM_IPHONE)
@@ -13558,7 +13556,7 @@ namespace Catch {
1355813556

1355913557
// Handle list request
1356013558
if( Option<std::size_t> listed = list( m_config ) )
13561-
return static_cast<int>( *listed );
13559+
return (std::min) (MaxExitCode, static_cast<int>(*listed));
1356213560

1356313561
TestGroup tests { m_config };
1356413562
auto const totals = tests.execute();
@@ -15391,7 +15389,7 @@ namespace Catch {
1539115389
}
1539215390

1539315391
Version const& libraryVersion() {
15394-
static Version version( 2, 13, 9, "", 0 );
15392+
static Version version( 2, 13, 10, "", 0 );
1539515393
return version;
1539615394
}
1539715395

@@ -17526,12 +17524,20 @@ namespace Catch {
1752617524

1752717525
#ifndef __OBJC__
1752817526

17527+
#ifndef CATCH_INTERNAL_CDECL
17528+
#ifdef _MSC_VER
17529+
#define CATCH_INTERNAL_CDECL __cdecl
17530+
#else
17531+
#define CATCH_INTERNAL_CDECL
17532+
#endif
17533+
#endif
17534+
1752917535
#if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)
1753017536
// Standard C/C++ Win32 Unicode wmain entry point
17531-
extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) {
17537+
extern "C" int CATCH_INTERNAL_CDECL wmain (int argc, wchar_t * argv[], wchar_t * []) {
1753217538
#else
1753317539
// Standard C/C++ main entry point
17534-
int main (int argc, char * argv[]) {
17540+
int CATCH_INTERNAL_CDECL main (int argc, char * argv[]) {
1753517541
#endif
1753617542

1753717543
return Catch::Session().run( argc, argv );

0 commit comments

Comments
 (0)