summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-05-09 18:45:44 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-05-09 18:45:44 (GMT)
commitdcc66a4f157ace0858b788228550f3e104df3242 (patch)
treee60eaa27df6d6bc80a32d6a73d329c41c423eb54
parent7aeebec9463d18c3040ba7fa37464c00b64ab75e (diff)
parentd6ea76ac002cd8483ba8a6aaf55bbce5ed552937 (diff)
downloadhdf5-dcc66a4f157ace0858b788228550f3e104df3242.zip
hdf5-dcc66a4f157ace0858b788228550f3e104df3242.tar.gz
hdf5-dcc66a4f157ace0858b788228550f3e104df3242.tar.bz2
Merge pull request #1049 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'd6ea76ac002cd8483ba8a6aaf55bbce5ed552937': GGC requires attribute before function Correct COMPILE defs usage Add missing module_dir property
-rw-r--r--c++/src/CMakeLists.txt4
-rw-r--r--c++/test/CMakeLists.txt2
-rw-r--r--fortran/testpar/CMakeLists.txt1
-rw-r--r--hl/fortran/examples/CMakeLists.txt1
-rw-r--r--hl/fortran/test/CMakeLists.txt1
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--src/H5detect.c40
-rw-r--r--test/CMakeLists.txt2
8 files changed, 32 insertions, 29 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 8226d16..cf7a8a5 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -88,7 +88,7 @@ target_include_directories(${HDF5_CPP_LIB_TARGET}
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_definitions(${HDF5_CPP_LIB_TARGET}
- PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:"-DMPICH_SKIP_MPICXX;-DMPICH_IGNORE_CXX_SEEK"># Parallel/MPI, prevent spurious cpp/cxx warnings
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
)
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
@@ -105,7 +105,7 @@ if (BUILD_SHARED_LIBS)
)
target_compile_definitions(${HDF5_CPP_LIBSH_TARGET}
PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
- PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:"-DMPICH_SKIP_MPICXX;-DMPICH_IGNORE_CXX_SEEK"># Parallel/MPI, prevent spurious cpp/cxx warnings
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
)
TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_CPP_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 0815aa8..33849a9 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -40,7 +40,7 @@ configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @O
add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} )
target_include_directories(cpp_testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
target_compile_definitions(cpp_testhdf5
- PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:"-DMPICH_SKIP_MPICXX;-DMPICH_IGNORE_CXX_SEEK"># Parallel/MPI, prevent spurious cpp/cxx warnings
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
)
TARGET_C_PROPERTIES (cpp_testhdf5 STATIC)
target_link_libraries (cpp_testhdf5 PRIVATE
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index bfb2495..0fe641f 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -41,6 +41,7 @@ endif()
set_target_properties (parallel_test PROPERTIES
FOLDER test/fortran
LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
endif ()
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index cc671f0..27971b2 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -32,6 +32,7 @@ foreach (example ${examples})
set_target_properties (hl_f90_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/hl/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
endforeach ()
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 0ee8d5b..6ee362d 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -37,6 +37,7 @@ macro (ADD_H5_FORTRAN_EXE file)
set_target_properties (hl_f90_${file} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
if (BUILD_SHARED_LIBS)
add_executable (hl_f90_${file}-shared ${file}.F90)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 70e18a2..9ff70f9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -905,8 +905,8 @@ target_compile_definitions(${HDF5_LIB_TARGET}
${HDF_EXTRA_FLAGS}
$<IF:$<CONFIG:Debug>,DEBUG,NDEBUG>
PRIVATE
- $<$<BOOL:${HDF5_ENABLE_TRACE}>:"H5_DEBUG_API"> # Enable tracing of the API
- $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:"H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG">
+ $<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
+ $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
)
TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_LIB_TARGET}
@@ -948,9 +948,9 @@ if (BUILD_SHARED_LIBS)
${HDF_EXTRA_FLAGS}
$<IF:$<CONFIG:Debug>,DEBUG,NDEBUG>
PRIVATE
- $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:"H5_HAVE_THREADSAFE">
- $<$<BOOL:${HDF5_ENABLE_TRACE}>:"H5_DEBUG_API"> # Enable tracing of the API
- $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:"H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG">
+ $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE>
+ $<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
+ $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
)
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_LIBSH_TARGET}
diff --git a/src/H5detect.c b/src/H5detect.c
index ff163cf..1c5554e 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -1360,8 +1360,8 @@ bit.\n";
*
*-------------------------------------------------------------------------
*/
-static void
-detect_C89_integers(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_C89_integers(void)
{
DETECT_BYTE(signed char, SCHAR, d_g[nd_g]); nd_g++;
DETECT_BYTE(unsigned char, UCHAR, d_g[nd_g]); nd_g++;
@@ -1388,8 +1388,8 @@ detect_C89_integers(void) HDF_NO_UBSAN
*
*-------------------------------------------------------------------------
*/
-static void
-detect_C89_floats(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_C89_floats(void)
{
DETECT_F(float, FLOAT, d_g[nd_g]); nd_g++;
DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
@@ -1410,8 +1410,8 @@ detect_C89_floats(void) HDF_NO_UBSAN
*
*-------------------------------------------------------------------------
*/
-static void
-detect_C99_integers8(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_C99_integers8(void)
{
#if H5_SIZEOF_INT8_T>0
#if H5_SIZEOF_INT8_T==1
@@ -1472,8 +1472,8 @@ detect_C99_integers8(void) HDF_NO_UBSAN
*
*-------------------------------------------------------------------------
*/
-static void
-detect_C99_integers16(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_C99_integers16(void)
{
#if H5_SIZEOF_INT16_T>0
DETECT_I(int16_t, INT16, d_g[nd_g]); nd_g++;
@@ -1510,8 +1510,8 @@ detect_C99_integers16(void) HDF_NO_UBSAN
*
*-------------------------------------------------------------------------
*/
-static void
-detect_C99_integers32(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_C99_integers32(void)
{
#if H5_SIZEOF_INT32_T>0
DETECT_I(int32_t, INT32, d_g[nd_g]); nd_g++;
@@ -1548,8 +1548,8 @@ detect_C99_integers32(void) HDF_NO_UBSAN
*
*-------------------------------------------------------------------------
*/
-static void
-detect_C99_integers64(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_C99_integers64(void)
{
#if H5_SIZEOF_INT64_T>0
DETECT_I(int64_t, INT64, d_g[nd_g]); nd_g++;
@@ -1599,8 +1599,8 @@ detect_C99_integers64(void) HDF_NO_UBSAN
*
*-------------------------------------------------------------------------
*/
-static void
-detect_C99_integers(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_C99_integers(void)
{
/* break it down to more subroutines so that each module subroutine */
/* is smaller and takes less time to compile with optimization on. */
@@ -1625,8 +1625,8 @@ detect_C99_integers(void) HDF_NO_UBSAN
*
*-------------------------------------------------------------------------
*/
-static void
-detect_C99_floats(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_C99_floats(void)
{
#if H5_SIZEOF_DOUBLE == H5_SIZEOF_LONG_DOUBLE
/*
@@ -1656,8 +1656,8 @@ detect_C99_floats(void) HDF_NO_UBSAN
*
*-------------------------------------------------------------------------
*/
-static void
-detect_alignments(void) HDF_NO_UBSAN
+static void HDF_NO_UBSAN
+detect_alignments(void)
{
/* Detect structure alignment for pointers, hvl_t, hobj_ref_t, hdset_reg_ref_t */
DETECT_M(void *, POINTER, m_g[na_g]); na_g++;
@@ -1744,8 +1744,8 @@ static int verify_signal_handlers(int signum, void (*handler)(int))
*
*-------------------------------------------------------------------------
*/
-int
-main(void) HDF_NO_UBSAN
+int HDF_NO_UBSAN
+main(void)
{
#if defined(H5_HAVE_SETSYSINFO) && defined(SSI_NVPAIRS)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 166fd99..8badf3c 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -45,7 +45,7 @@ if (BUILD_SHARED_LIBS)
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_definitions(${HDF5_TEST_LIBSH_TARGET}
- PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:"H5_HAVE_THREADSAFE">
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE>
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET}