From c6c2a71fb7c4ea36558c911f964557b7ac3a35c8 Mon Sep 17 00:00:00 2001 From: Niyas Sait Date: Mon, 16 Aug 2021 11:25:07 +0100 Subject: [PATCH] Fix ctest.h to build using clang on windows --- utest/ctest.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utest/ctest.h b/utest/ctest.h index 037f7f28d..79961badf 100644 --- a/utest/ctest.h +++ b/utest/ctest.h @@ -65,9 +65,14 @@ struct ctest { #undef CTEST_SEGFAULT #endif -#if defined(_WIN32) && defined(_MSC_VER) +#if defined(_WIN32) +#if defined(__clang__) +#define __CTEST_NO_TIME +#undef CTEST_SEGFAULT +#elif defined(_MSC_VER) #define __CTEST_MSVC #endif +#endif //config for MSVC compiler #ifdef __CTEST_MSVC @@ -286,7 +291,7 @@ void assert_dbl_far(double exp, double real, double tol, const char* caller, int #endif #include -#ifdef __CTEST_MSVC +#ifdef _WIN32 #include #else #include