File tree 3 files changed +16
-3
lines changed
3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -1057,9 +1057,15 @@ OPTION(ENABLE_BYTERANGE "Enable byte-range access to remote datasets.." OFF)
1057
1057
# Check for the math library so it can be explicitly linked.
1058
1058
IF (NOT WIN32 )
1059
1059
FIND_LIBRARY (HAVE_LIBM NAMES math m libm)
1060
- MESSAGE (STATUS "Found Math library: ${HAVE_LIBM} " )
1061
1060
IF (NOT HAVE_LIBM)
1062
- MESSAGE (FATAL_ERROR "Unable to find the math library." )
1061
+ CHECK_FUNCTION_EXISTS(exp HAVE_LIBM_FUNC)
1062
+ IF (NOT HAVE_LIBM_FUNC)
1063
+ MESSAGE (FATAL_ERROR "Unable to find the math library." )
1064
+ ELSE (NOT HAVE_LIBM_FUNC)
1065
+ SET (HAVE_LIBM "" )
1066
+ ENDIF ()
1067
+ ELSE (NOT HAVE_LIBM)
1068
+ MESSAGE (STATUS "Found Math library: ${HAVE_LIBM} " )
1063
1069
ENDIF ()
1064
1070
ENDIF ()
1065
1071
Original file line number Diff line number Diff line change @@ -441,6 +441,9 @@ with zip */
441
441
/* if true , HDF5 is at least version 1.10.5 and supports UTF8 paths */
442
442
#cmakedefine HDF5_UTF8_PATHS 1
443
443
444
+ /* if true , backtrace support will be used. */
445
+ #cmakedefine HAVE_EXECINFO_H 1
446
+
444
447
/* if true , include JNA bug fix */
445
448
#cmakedefine JNA 1
446
449
Original file line number Diff line number Diff line change 5
5
#include "config.h"
6
6
#include <stdarg.h>
7
7
#include <stdio.h>
8
- #if !defined _WIN32 && !defined __CYGWIN__
8
+ #ifdef HAVE_EXECINFO_H
9
9
#include <execinfo.h>
10
10
#endif
11
11
15
15
16
16
#define STSIZE 1000
17
17
18
+ #ifdef HAVE_EXECINFO_H
18
19
#ifdef H5BACKTRACE
19
20
# if !defined _WIN32 && !defined __CYGWIN__
20
21
static void * stacktrace [STSIZE ];
21
22
# endif
22
23
#endif
24
+ #endif
23
25
24
26
int
25
27
nch5breakpoint (int err )
26
28
{
29
+ #ifdef HAVE_EXECINFO_H
27
30
#ifdef H5BACKTRACE
28
31
# if !defined _WIN32 && !defined __CYGWIN__
29
32
int count = 0 ;
@@ -39,6 +42,7 @@ nch5breakpoint(int err)
39
42
if (trace != NULL ) free (trace );
40
43
# endif
41
44
# endif
45
+ #endif
42
46
#endif
43
47
return err ;
44
48
}
You can’t perform that action at this time.
0 commit comments