summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-07-15 16:27:52 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-07-15 16:27:52 (GMT)
commitb0445792fb7cbdc3db9ad9473a934e3079bceb6e (patch)
tree331d92b3dd1929e561e2c4b5f91419caed70cb0d /src
parent1ecb6ec9c5075a97572d06a1f509cd763be2bc94 (diff)
downloadhdf5-b0445792fb7cbdc3db9ad9473a934e3079bceb6e.zip
hdf5-b0445792fb7cbdc3db9ad9473a934e3079bceb6e.tar.gz
hdf5-b0445792fb7cbdc3db9ad9473a934e3079bceb6e.tar.bz2
CMake updates:
Add build folder as Include for generated files Add install option for copying Fortran mod files to include folder Add PRI defines to win32defs file Exclude mingw from extra flags
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/H5win32defs.h48
2 files changed, 44 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5ded303..9ff16c9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1074,7 +1074,7 @@ if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories (${HDF5_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
- INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_BINARY_DIR}>"
)
target_compile_options(${HDF5_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${HDF5_LIB_TARGET}
@@ -1111,7 +1111,7 @@ if (BUILD_SHARED_LIBS)
target_include_directories (${HDF5_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
PUBLIC "$<$<BOOL:${HDF5_ENABLE_HDFS}>:${HDFS_INCLUDE_DIR}>"
- INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_BINARY_DIR}>"
)
target_compile_options(${HDF5_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${HDF5_LIBSH_TARGET}
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 0a0bd37..8c5ae1a 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -20,6 +20,45 @@
* inside H5private.h
*
*/
+#ifndef H5_HAVE_INTTYPES_H
+/* The following definitions should be suitable for 64-bit Windows, which is
+ * LLP64, and for 32-bit Windows, which is ILP32. Those are the only
+ * platforms where <inttypes.h> is likely to be missing. VS2015 and later
+ * *may* provide these definitions.
+ */
+#ifdef _WIN64
+# define PRIdPTR "lld"
+# define PRIoPTR "llo"
+# define PRIuPTR "llu"
+# define PRIxPTR "llx"
+#else /* _WIN64 */
+# define PRIdPTR "ld"
+# define PRIoPTR "lo"
+# define PRIuPTR "lu"
+# define PRIxPTR "lx"
+#endif /* _WIN64 */
+
+# define PRId8 "d"
+# define PRIo8 "o"
+# define PRIu8 "u"
+# define PRIx8 "x"
+# define PRId16 "d"
+# define PRIo16 "o"
+# define PRIu16 "u"
+# define PRIx16 "x"
+# define PRId32 "d"
+# define PRIo32 "o"
+# define PRIu32 "u"
+# define PRIx32 "x"
+# define PRId64 "lld"
+# define PRIo64 "llo"
+# define PRIu64 "llu"
+# define PRIx64 "llx"
+# define PRIdMAX "lld"
+# define PRIoMAX "llo"
+# define PRIuMAX "llu"
+# define PRIxMAX "llx"
+#endif
/*
* _MSC_VER = 1900 VS2015
@@ -41,11 +80,6 @@ typedef __int64 h5_stat_size_t;
#define HDfstat(F,B) _fstati64(F,B)
#define HDisatty(F) _isatty(F)
-/* The isnan function needs underscore in VS2012 and earlier */
-#if (_MSC_VER <= 1700)
- #define HDisnan(X) _isnan(X)
-#endif /* MSC_VER < 1700 */
-
#define HDgetcwd(S,Z) _getcwd(S,Z)
#define HDgetdcwd(D,S,Z) _getdcwd(D,S,Z)
#define HDgetdrive() _getdrive()
@@ -111,8 +145,10 @@ struct timespec
};
#endif /* MSC_VER < 1900 */
-/* The round functions do not exist in VS2012 and earlier */
#if (_MSC_VER <= 1700)
+/* The isnan function needs underscore in VS2012 and earlier */
+#define HDisnan(X) _isnan(X)
+/* The round functions do not exist in VS2012 and earlier */
#define HDllround(V) Wllround(V)
#define HDllroundf(V) Wllroundf(V)
#define HDlround(V) Wlround(V)