From 7e79c375b062311a1209c24c69460673202e1ef9 Mon Sep 17 00:00:00 2001 From: topazus Date: Sun, 17 Dec 2023 19:56:53 +0800 Subject: [PATCH 1/6] Use ARCH_INDEPENDENT when available --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65fb923b..19c4efcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,9 +126,13 @@ if(frozen.installation) # generate a CMake configuration file for consumption by CMake's `find_package` # intrinsic # + if(${CMAKE_VERSION} VERSION_GREATER "3.14") + set(OPTIONAL_ARCH_INDEPENDENT "ARCH_INDEPENDENT") + endif() write_basic_package_version_file("frozenConfigVersion.cmake" VERSION ${PROJECT_VERSION} - COMPATIBILITY SameMajorVersion) + COMPATIBILITY SameMajorVersion + ${OPTIONAL_ARCH_INDEPENDENT}) install(FILES "${PROJECT_BINARY_DIR}/frozenConfigVersion.cmake" DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/frozen") From edd9e7647a3689ab9e396ba9685ec12253f4cce0 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Sun, 4 Feb 2024 21:39:10 +0100 Subject: [PATCH 2/6] [ci] Add tests for gcc 13 and clang 15 --- .github/workflows/linux.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index bebc9b33..6db33364 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -8,20 +8,25 @@ jobs: strategy: fail-fast: false matrix: - compiler: - # - g++-9 - - g++-10 - - g++-11 - - g++-12 - # - clang++-12 - - clang++-13 - - clang++-14 - cmake_args: - - "" cxxstandard: - 14 - 17 - 2a + include: + - compiler: g++-10 + stdlib: libstdc++ + - compiler: g++-11 + stdlib: libstdc++ + - compiler: g++-12 + stdlib: libstdc++ + - compiler: g++-13 + stdlib: libstdc++ + - compiler: clang++-13 + stdlib: libc++ + - compiler: clang++-14 + stdlib: libc++ + - compiler: clang++-15 + stdlib: libstdc++ steps: - name: Checkout uses: actions/checkout@v2 @@ -35,7 +40,7 @@ jobs: working-directory: build env: CXX: ${{matrix.compiler}} - CXXFLAGS: -std=c++${{matrix.cxxstandard}} + CXXFLAGS: -std=c++${{matrix.cxxstandard}} -stdlib=${{matrix.stdlib}} run: cmake -DCMAKE_BUILD_TYPE=DEBUG "-Dfrozen.coverage=ON" -DCMAKE_VERBOSE_MAKEFILE=ON .. - name: Build From d8d567f4245c1d5d6fa63ede1b955871db955dad Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Sun, 4 Feb 2024 23:10:41 +0100 Subject: [PATCH 3/6] [ci] Update github action versions --- .github/workflows/linux.yml | 4 +--- .github/workflows/osx.yml | 4 +--- .github/workflows/windows.yml | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6db33364..935af4e8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -29,9 +29,7 @@ jobs: stdlib: libstdc++ steps: - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 1 + uses: actions/checkout@v4 - name: Prepare run: cmake -E make_directory build diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 4ea39a86..26f0f1b9 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -16,9 +16,7 @@ jobs: - 2a steps: - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 1 + uses: actions/checkout@v4 - name: Prepare run: cmake -E make_directory build diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 9052fc0d..0272bd7d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -16,9 +16,7 @@ jobs: - 2a steps: - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 1 + uses: actions/checkout@v4 - name: Prepare run: cmake -E make_directory build From 3d33fb47eb38b783e709b3ac41f28a8403a15f7a Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Sun, 4 Feb 2024 21:59:26 +0100 Subject: [PATCH 4/6] Upgrade catch to v2.13.10 --- tests/catch.hpp | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/tests/catch.hpp b/tests/catch.hpp index db1fed3b..9b309bdd 100644 --- a/tests/catch.hpp +++ b/tests/catch.hpp @@ -1,6 +1,6 @@ /* - * Catch v2.13.8 - * Generated: 2022-01-03 21:20:09.589503 + * Catch v2.13.10 + * Generated: 2022-10-16 11:01:23.452308 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved. @@ -15,7 +15,7 @@ #define CATCH_VERSION_MAJOR 2 #define CATCH_VERSION_MINOR 13 -#define CATCH_VERSION_PATCH 8 +#define CATCH_VERSION_PATCH 10 #ifdef __clang__ # pragma clang system_header @@ -7395,8 +7395,6 @@ namespace Catch { template struct ObjectStorage { - using TStorage = typename std::aligned_storage::value>::type; - ObjectStorage() : data() {} ObjectStorage(const ObjectStorage& other) @@ -7439,7 +7437,7 @@ namespace Catch { return *static_cast(static_cast(&data)); } - TStorage data; + struct { alignas(T) unsigned char data[sizeof(T)]; } data; }; } @@ -7949,7 +7947,7 @@ namespace Catch { #if defined(__i386__) || defined(__x86_64__) #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ #elif defined(__aarch64__) - #define CATCH_TRAP() __asm__(".inst 0xd4200000") + #define CATCH_TRAP() __asm__(".inst 0xd43e0000") #endif #elif defined(CATCH_PLATFORM_IPHONE) @@ -13392,6 +13390,10 @@ namespace Catch { filename.erase(0, lastSlash); filename[0] = '#'; } + else + { + filename.insert(0, "#"); + } auto lastDot = filename.find_last_of('.'); if (lastDot != std::string::npos) { @@ -13554,7 +13556,7 @@ namespace Catch { // Handle list request if( Option listed = list( m_config ) ) - return static_cast( *listed ); + return (std::min) (MaxExitCode, static_cast(*listed)); TestGroup tests { m_config }; auto const totals = tests.execute(); @@ -15387,7 +15389,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 2, 13, 8, "", 0 ); + static Version version( 2, 13, 10, "", 0 ); return version; } @@ -17522,12 +17524,20 @@ namespace Catch { #ifndef __OBJC__ +#ifndef CATCH_INTERNAL_CDECL +#ifdef _MSC_VER +#define CATCH_INTERNAL_CDECL __cdecl +#else +#define CATCH_INTERNAL_CDECL +#endif +#endif + #if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) // Standard C/C++ Win32 Unicode wmain entry point -extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) { +extern "C" int CATCH_INTERNAL_CDECL wmain (int argc, wchar_t * argv[], wchar_t * []) { #else // Standard C/C++ main entry point -int main (int argc, char * argv[]) { +int CATCH_INTERNAL_CDECL main (int argc, char * argv[]) { #endif return Catch::Session().run( argc, argv ); @@ -17890,7 +17900,7 @@ using Catch::Detail::Approx; #define INFO( msg ) (void)(0) #define UNSCOPED_INFO( msg ) (void)(0) #define WARN( msg ) (void)(0) -#define CAPTURE( msg ) (void)(0) +#define CAPTURE( ... ) (void)(0) #define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) From 292a8110466ae964c8fde9d0e0371e5ac21bfa60 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Wed, 20 Mar 2024 07:23:42 +0100 Subject: [PATCH 5/6] Drop a note in the README about the stability of frozen Fix #171 --- README.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.rst b/README.rst index 5a1ceb9f..1c61ddad 100644 --- a/README.rst +++ b/README.rst @@ -26,6 +26,15 @@ Once initialized, the container keys cannot be updated, and in exchange, lookups are faster. And initialization is free when ``constexpr`` or ``constinit`` is used :-). +Stable Version +-------------- + +The Frozen library is pretty stable now, have been so for years, so: + +1. The ``master`` version can be used as the default **stable** version. +2. It is in maintenance mode. I still accept commits that make the code cleaner + ``|`` faster ``|`` more modern, but expect some latency in the review process. + Installation ------------ From 06bee5321cecd9a9ffaceb164b5adb2ffafae781 Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Sun, 2 Jun 2024 00:22:59 +0200 Subject: [PATCH 6/6] Fixing "'macro' is not defined" warning, when using clang-tidy --- include/frozen/bits/defines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/frozen/bits/defines.h b/include/frozen/bits/defines.h index e20f6d0c..839f4e83 100644 --- a/include/frozen/bits/defines.h +++ b/include/frozen/bits/defines.h @@ -55,11 +55,11 @@ #define FROZEN_LETITGO_HAS_CHAR8T #endif -#if __cpp_deduction_guides >= 201703L +#if defined(__cpp_deduction_guides) && __cpp_deduction_guides >= 201703L #define FROZEN_LETITGO_HAS_DEDUCTION_GUIDES #endif -#if __cpp_lib_constexpr_string >= 201907L +#if defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L #define FROZEN_LETITGO_HAS_CONSTEXPR_STRING #endif