mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-16 18:52:25 +01:00
Add MINGW32 compiler flag. (see #2094)
This commit is contained in:
parent
e3aaa40fe7
commit
d8b5016fc9
@ -40,6 +40,10 @@
|
||||
#define CATCH_COMPILER_MSC
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#define CATCH_COMPILER_MINGW32
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
|
||||
@ -139,7 +143,7 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Not all Windows environments support SEH properly
|
||||
#if defined(__MINGW32__)
|
||||
#if defined(CATCH_COMPILER_MINGW32)
|
||||
# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH
|
||||
#endif
|
||||
|
||||
|
@ -108,7 +108,7 @@
|
||||
return IsDebuggerPresent() != 0;
|
||||
}
|
||||
}
|
||||
#elif defined(__MINGW32__)
|
||||
#elif defined(CATCH_COMPILER_MINGW32)
|
||||
extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent();
|
||||
namespace Catch {
|
||||
bool isDebuggerActive() {
|
||||
|
@ -49,7 +49,7 @@ namespace Catch {
|
||||
#endif
|
||||
#elif defined(CATCH_COMPILER_MSC)
|
||||
#define CATCH_TRAP() __debugbreak()
|
||||
#elif defined(__MINGW32__)
|
||||
#elif defined(CATCH_COMPILER_MINGW32)
|
||||
extern "C" __declspec(dllimport) void __stdcall DebugBreak();
|
||||
#define CATCH_TRAP() DebugBreak()
|
||||
#endif
|
||||
|
@ -24,7 +24,7 @@
|
||||
#elif defined(linux) || defined(__linux) || defined(__linux__)
|
||||
# define CATCH_PLATFORM_LINUX
|
||||
|
||||
#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(CATCH_COMPILER_MSC) || defined(__MINGW32__)
|
||||
#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(CATCH_COMPILER_MSC) || defined(CATCH_COMPILER_MINGW32)
|
||||
# define CATCH_PLATFORM_WINDOWS
|
||||
#endif
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace Catch {
|
||||
std::time(&rawtime);
|
||||
|
||||
std::tm timeInfo = {};
|
||||
#if defined (CATCH_COMPILER_MSC) || defined (__MINGW32__)
|
||||
#if defined (CATCH_COMPILER_MSC) || defined (CATCH_COMPILER_MINGW32)
|
||||
gmtime_s(&timeInfo, &rawtime);
|
||||
#else
|
||||
gmtime_r(&rawtime, &timeInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user