Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Removed spurious "inline" (was causing linker errors) and fixed broken macOS detection

Commit
e3e6453229705ad9ac122c3a165538f4616d1571
Author
Phil Nash ·
Parents
878bd140e6fd

Files · Download .tar.gz

Changes

 include/internal/catch_debugger.cpp | 1 +
 include/internal/catch_platform.h   | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/internal/catch_debugger.cpp b/include/internal/catch_debugger.cpp
index c7d66375..4d05c85a 100644
--- a/include/internal/catch_debugger.cpp
+++ b/include/internal/catch_debugger.cpp
@@ -10,6 +10,7 @@
 #include "catch_debugger.h"
 #include "catch_errno_guard.h"
 #include "catch_stream.h"
+#include "catch_platform.h"
 
 #ifdef CATCH_PLATFORM_MAC
 
diff --git a/include/internal/catch_platform.h b/include/internal/catch_platform.h
index 09b91bfb..87250c60 100644
--- a/include/internal/catch_platform.h
+++ b/include/internal/catch_platform.h
@@ -9,12 +9,17 @@
 #ifndef TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED
 #define TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED
 
-#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+#ifdef __APPLE__
+# include <TargetConditionals.h>
+# if TARGET_OS_MAC == 1
 #  define CATCH_PLATFORM_MAC
-#elif  defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
+# elif TARGET_OS_IPHONE == 1
 #  define CATCH_PLATFORM_IPHONE
+# endif
+
 #elif defined(linux) || defined(__linux) || defined(__linux__)
 #  define CATCH_PLATFORM_LINUX
+
 #elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER)
 #  define CATCH_PLATFORM_WINDOWS
 #  if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX)