From 98f8fd9603e085cf110df56192d657bc0dec164c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jan 2018 12:43:01 -0600 Subject: HDFFV-10398 Suppress VS 2015 assertion failure popup during try_run --- config/cmake_ext_mod/HDFTests.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c index 60ac744..320fd5b 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -222,12 +222,26 @@ SIMPLE_TEST(struct stat sb; sb.st_blocks=0); #include #include +#if defined(_MSC_VER) && defined(_DEBUG) +# include +int DebugReport(int reportType, char* message, int* returnValue) +{ + (void)reportType; + (void)message; + (void)returnValue; + return 1; /* no further handling required */ +} +#endif + int main(void) { char *llwidthArgs[] = { "I64", "l64", "l", "L", "q", "ll", NULL }; char *s = malloc(128); char **currentArg = NULL; LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576; + #if defined(_MSC_VER) && defined(_DEBUG) + _CrtSetReportHook(DebugReport); + #endif for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++) { char formatString[64]; -- cgit v0.12