Merge branch 'main' into dev
This commit is contained in:
commit
71366555b0
@ -12,6 +12,9 @@
|
||||
|
||||
Tiny patch:
|
||||
- Fix `CPPTRACE_EXPORT` annotations
|
||||
- Add workaround for [msvc bug][msvc bug] affecting msvc 19.38.
|
||||
|
||||
[msvc bug]: https://developercommunity.visualstudio.com/t/MSVC-1938331290-preview-fails-to-comp/10505565
|
||||
|
||||
# v0.3.0
|
||||
|
||||
|
||||
10
README.md
10
README.md
@ -106,20 +106,20 @@ FetchContent_Declare(
|
||||
GIT_TAG v0.3.1 # <HASH or TAG>
|
||||
)
|
||||
FetchContent_MakeAvailable(cpptrace)
|
||||
target_link_libraries(your_target cpptrace)
|
||||
target_link_libraries(your_target cpptrace::cpptrace)
|
||||
|
||||
# On windows copy cpptrace.dll to the same directory as the executable for your_target
|
||||
if(WIN32)
|
||||
add_custom_command(
|
||||
TARGET your_target POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
$<TARGET_FILE:cpptrace>
|
||||
$<TARGET_FILE:cpptrace::cpptrace>
|
||||
$<TARGET_FILE_DIR:your_target>
|
||||
)
|
||||
endif()
|
||||
```
|
||||
|
||||
On windows and macos some extra work is required, see [below](#platform-logistics).
|
||||
On macos a little extra work to generate a .dSYM file is required, see [below](#platform-logistics).
|
||||
|
||||
# In-Depth Documentation
|
||||
|
||||
@ -553,7 +553,7 @@ FetchContent_Declare(
|
||||
GIT_TAG v0.3.1 # <HASH or TAG>
|
||||
)
|
||||
FetchContent_MakeAvailable(cpptrace)
|
||||
target_link_libraries(your_target cpptrace)
|
||||
target_link_libraries(your_target cpptrace::cpptrace)
|
||||
```
|
||||
|
||||
It's as easy as that. Cpptrace will automatically configure itself for your system. Note: On windows and macos some
|
||||
@ -683,7 +683,7 @@ if(WIN32)
|
||||
add_custom_command(
|
||||
TARGET your_target POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
$<TARGET_FILE:cpptrace>
|
||||
$<TARGET_FILE:cpptrace::cpptrace>
|
||||
$<TARGET_FILE_DIR:your_target>
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -363,19 +363,23 @@ namespace detail {
|
||||
|
||||
template<
|
||||
typename T,
|
||||
typename D,
|
||||
typename std::enable_if<
|
||||
std::is_same<decltype(std::declval<D>()(std::declval<T>())), void>::value,
|
||||
int
|
||||
>::type = 0,
|
||||
typename std::enable_if<
|
||||
std::is_standard_layout<T>::value && std::is_trivial<T>::value,
|
||||
int
|
||||
>::type = 0,
|
||||
typename std::enable_if<
|
||||
std::is_nothrow_move_constructible<T>::value,
|
||||
int
|
||||
>::type = 0
|
||||
typename D
|
||||
// workaround a msvc bug https://developercommunity.visualstudio.com/t/MSVC-1938331290-preview-fails-to-comp/10505565
|
||||
#if !defined(_MSC_VER) || _MSC_VER != 1938
|
||||
,
|
||||
typename std::enable_if<
|
||||
std::is_same<decltype(std::declval<D>()(std::declval<T>())), void>::value,
|
||||
int
|
||||
>::type = 0,
|
||||
typename std::enable_if<
|
||||
std::is_standard_layout<T>::value && std::is_trivial<T>::value,
|
||||
int
|
||||
>::type = 0,
|
||||
typename std::enable_if<
|
||||
std::is_nothrow_move_constructible<T>::value,
|
||||
int
|
||||
>::type = 0
|
||||
#endif
|
||||
>
|
||||
class raii_wrapper {
|
||||
T obj;
|
||||
@ -409,15 +413,19 @@ namespace detail {
|
||||
|
||||
template<
|
||||
typename T,
|
||||
typename D,
|
||||
typename std::enable_if<
|
||||
std::is_same<decltype(std::declval<D>()(std::declval<T>())), void>::value,
|
||||
int
|
||||
>::type = 0,
|
||||
typename std::enable_if<
|
||||
std::is_standard_layout<T>::value && std::is_trivial<T>::value,
|
||||
int
|
||||
>::type = 0
|
||||
typename D
|
||||
// workaround a msvc bug https://developercommunity.visualstudio.com/t/MSVC-1938331290-preview-fails-to-comp/10505565
|
||||
#if !defined(_MSC_VER) || _MSC_VER != 1938
|
||||
,
|
||||
typename std::enable_if<
|
||||
std::is_same<decltype(std::declval<D>()(std::declval<T>())), void>::value,
|
||||
int
|
||||
>::type = 0,
|
||||
typename std::enable_if<
|
||||
std::is_standard_layout<T>::value && std::is_trivial<T>::value,
|
||||
int
|
||||
>::type = 0
|
||||
#endif
|
||||
>
|
||||
raii_wrapper<typename std::remove_reference<T>::type, D> raii_wrap(T obj, D deleter) {
|
||||
return raii_wrapper<typename std::remove_reference<T>::type, D>(obj, deleter);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user