mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:19:00 +08:00
[libassert] Add 2.0.0 (#37506)
This commit is contained in:
parent
65b5ab9db5
commit
620817411f
@ -1,13 +0,0 @@
|
||||
diff --git a/src/assert.cpp b/src/assert.cpp
|
||||
index 8d4bd24..bd4bc58 100644
|
||||
--- a/src/assert.cpp
|
||||
+++ b/src/assert.cpp
|
||||
@@ -1655,7 +1655,7 @@ namespace libassert::detail {
|
||||
const size_t max_frame_width = n_digits(end - start);
|
||||
// do the actual trace
|
||||
for(size_t i = start; i <= end; i++) {
|
||||
- const auto& [address, line, col, source_path, signature, is_inline] = trace.frames[i];
|
||||
+ const auto& [raw_address, obj_address, line, col, source_path, signature, is_inline] = trace.frames[i];
|
||||
const std::string line_number = line.has_value() ? std::to_string(line.value()) : "?";
|
||||
// look for repeats, i.e. recursion we can fold
|
||||
size_t recursion_folded = 0;
|
@ -1,22 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c653d61..c9e599f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -43,7 +43,7 @@ target_include_directories(
|
||||
assert
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
|
||||
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/assert/assert>
|
||||
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/assert>
|
||||
)
|
||||
|
||||
#set(CMAKE_CXX_FLAGS_REL_WITH_ASSERTS "-O3")
|
||||
@@ -119,7 +121,7 @@ if(NOT CMAKE_SKIP_INSTALL_RULES)
|
||||
install(
|
||||
FILES
|
||||
include/assert.hpp
|
||||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/assert/assert
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/assert
|
||||
)
|
||||
|
||||
install(
|
@ -1,26 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c653d61..a5d9980 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -94,6 +94,8 @@ endif()
|
||||
|
||||
if(ASSERT_USE_MAGIC_ENUM)
|
||||
target_compile_definitions(assert PUBLIC ASSERT_USE_MAGIC_ENUM)
|
||||
+ find_package(magic_enum CONFIG REQUIRED)
|
||||
+ target_link_libraries(assert PUBLIC magic_enum::magic_enum)
|
||||
endif()
|
||||
|
||||
if(NOT "${ASSERT_FAIL}" STREQUAL "")
|
||||
diff --git a/include/assert.hpp b/include/assert.hpp
|
||||
index b49c633..299a47e 100644
|
||||
--- a/include/assert.hpp
|
||||
+++ b/include/assert.hpp
|
||||
@@ -34,7 +34,7 @@
|
||||
#ifdef ASSERT_USE_MAGIC_ENUM
|
||||
// this is a temporary hack to make testing thing in compiler explorer quicker (it disallows simple relative includes)
|
||||
#include \
|
||||
- "../third_party/magic_enum.hpp"
|
||||
+ <magic_enum.hpp>
|
||||
#endif
|
||||
|
||||
#define LIBASSERT_IS_CLANG 0
|
@ -2,36 +2,29 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO jeremy-rifkin/libassert
|
||||
REF "v${VERSION}"
|
||||
SHA512 beba94e033f7e43c84123736a32725a333c915392d5dc57c26a63f832a507564d79f290a151cb136de8bded3d8d343dad3c4bf2efec9977d878df3c9a8677554
|
||||
SHA512 35fdf48cc157e0f269ccae66f9d000d3a1e01bdd8a23d04e1a0ddc9e6c962c6507702bb3494cbc4d06d59f1af27e1c053f8ae3167c2ae9efd2644df505058175
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
runtime_destination.patch
|
||||
magic-enum.patch
|
||||
include-dir.patch
|
||||
cpptrace-0.4.1.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DASSERT_USE_EXTERNAL_CPPTRACE=ON
|
||||
-DASSERT_STATIC=${BUILD_STATIC}
|
||||
-DLIBASSERT_USE_EXTERNAL_CPPTRACE=ON
|
||||
-DLIBASSERT_USE_EXTERNAL_MAGIC_ENUM=ON
|
||||
-DLIBASSERT_BUILD_SHARED=${BUILD_SHARED}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(
|
||||
PACKAGE_NAME assert
|
||||
CONFIG_PATH lib/cmake/assert
|
||||
PACKAGE_NAME libassert
|
||||
CONFIG_PATH lib/cmake/libassert
|
||||
)
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(APPEND "${CURRENT_PACKAGES_DIR}/share/assert/assert-config.cmake" "include(CMakeFindDependencyMacro)
|
||||
find_dependency(magic_enum)
|
||||
find_dependency(cpptrace)")
|
||||
file(APPEND "${CURRENT_PACKAGES_DIR}/share/libassert/libassert-config.cmake" "find_dependency(magic_enum)")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/assert/third_party")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ccc959e..d3e5d09 100644
|
||||
--- a/CMakeLists.txt 2023-11-13 15:53:51.177963300 -0500
|
||||
+++ b/CMakeLists.txt 2023-11-13 16:10:15.969939100 -0500
|
||||
@@ -112,7 +112,7 @@
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
install(
|
@ -1,8 +1,7 @@
|
||||
{
|
||||
"name": "libassert",
|
||||
"version": "1.2.2",
|
||||
"port-version": 2,
|
||||
"description": "The most over-engineered and overpowered C++ assertion library.",
|
||||
"version": "2.0.0",
|
||||
"description": "The most over-engineered C++ assertion library",
|
||||
"homepage": "https://github.com/jeremy-rifkin/libassert",
|
||||
"license": "MIT",
|
||||
"supports": "!uwp",
|
||||
|
@ -4149,8 +4149,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"libassert": {
|
||||
"baseline": "1.2.2",
|
||||
"port-version": 2
|
||||
"baseline": "2.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"libassuan": {
|
||||
"baseline": "2.5.7",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "13ac309aa7d3056f9e42c5298157f0c6a1f4c164",
|
||||
"version": "2.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "9cdcc4bae068fc3645319ee08faba34d533dfec8",
|
||||
"version": "1.2.2",
|
||||
|
Loading…
Reference in New Issue
Block a user