File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,14 @@ if (NOT _BACKWARD_DEFINITIONS)
189189 map_definitions("STACK_DETAILS_" "BACKWARD_HAS_" BACKTRACE_SYMBOL DW BFD DWARF)
190190endif ()
191191
192+ if (WIN32 )
193+ list (APPEND _BACKWARD_LIBRARIES dbghelp psapi)
194+ if (MINGW)
195+ set (MINGW_MSVCR_LIBRARY "msvcr90$<$<CONFIG:DEBUG>:d>" CACHE STRING "Mingw MSVC runtime import library" )
196+ list (APPEND _BACKWARD_LIBRARIES ${MINGW_MSVCR_LIBRARY} )
197+ endif ()
198+ endif ()
199+
192200set (BACKWARD_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR} " )
193201
194202set (BACKWARD_HAS_EXTERNAL_LIBRARIES FALSE )
Original file line number Diff line number Diff line change 340340#include < basetsd.h>
341341typedef SSIZE_T ssize_t ;
342342
343+ #ifndef NOMINMAX
343344#define NOMINMAX
345+ #endif
344346#include < windows.h>
345347#include < winnt.h>
346348
@@ -352,8 +354,10 @@ typedef SSIZE_T ssize_t;
352354#define NOINLINE __declspec (noinline)
353355#endif
354356
357+ #ifdef _MSC_VER
355358#pragma comment(lib, "psapi.lib")
356359#pragma comment(lib, "dbghelp.lib")
360+ #endif
357361
358362// Comment / packing is from stackoverflow:
359363// https://stackoverflow.com/questions/6205981/windows-c-stack-trace-from-a-running-app/28276227#28276227
Original file line number Diff line number Diff line change 2626#include < cstdlib>
2727
2828#ifdef _WIN32
29- #include < Windows .h>
29+ #include < windows .h>
3030#define strcasecmp _stricmp
3131#else
3232#include < sys/wait.h>
You can’t perform that action at this time.
0 commit comments