Skip to content

Commit

Permalink
[cpptrace] Update to 0.5.0 (#37512)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin authored Mar 18, 2024
1 parent 6d75af0 commit 40a3e29
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
34 changes: 34 additions & 0 deletions ports/cpptrace/conversion.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 851c1e9..23bd55f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -288,6 +288,8 @@ target_compile_features(
PRIVATE cxx_std_11
)

+target_compile_definitions(${target_name} PRIVATE NOMINMAX)
+
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
diff --git a/src/snippets/snippet.cpp b/src/snippets/snippet.cpp
index d9ec4dc..660d375 100644
--- a/src/snippets/snippet.cpp
+++ b/src/snippets/snippet.cpp
@@ -9,6 +9,7 @@
#include <iostream>

#include "../utils/common.hpp"
+#include "../utils/utils.hpp"

namespace cpptrace {
namespace detail {
@@ -36,7 +37,7 @@ namespace detail {
}
// else load file
file.seekg(0, std::ios::beg);
- contents.resize(size);
+ contents.resize(to<std::size_t>(size));
if(!file.read(&contents[0], size)) {
// error ...
}
4 changes: 3 additions & 1 deletion ports/cpptrace/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jeremy-rifkin/cpptrace
REF "v${VERSION}"
SHA512 f36f2aa6f94570eac5e01faafdf1fed98f7e308558726ed2499bcf58cb2e9e838fa928b3d32eaca93173976340f72534d340d662491c51ee75ed633b026c14bc
SHA512 61d041c550ea5e5f887d181ac89b9c2aaa6b9165529d4815caf54dcfea3e00548bbae104d64a7298a075d6337f0aca3d3325f6b20e6004353a75e7f3e3a0443a
HEAD_REF main
PATCHES
conversion.patch
)

vcpkg_cmake_configure(
Expand Down
2 changes: 1 addition & 1 deletion ports/cpptrace/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cpptrace",
"version": "0.4.1",
"version": "0.5.0",
"description": "Simple, portable, and self-contained stacktrace library for C++11 and newer",
"homepage": "https://github.com/jeremy-rifkin/cpptrace",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,7 @@
"port-version": 4
},
"cpptrace": {
"baseline": "0.4.1",
"baseline": "0.5.0",
"port-version": 0
},
"cppunit": {
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/cpptrace.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e9f72095acc3125b572269e30506eaf670cfd089",
"version": "0.5.0",
"port-version": 0
},
{
"git-tree": "366e041c6686ceaee1053bacaacc3343ac716fab",
"version": "0.4.1",
Expand Down

0 comments on commit 40a3e29

Please sign in to comment.