summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-03-25 22:08:46 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-03-25 22:08:46 (GMT)
commit451a91e53bdc0f930c2acf382d14a5e2fd9cb2d9 (patch)
tree145b94b29e9cc5b7f9c6b2477d076f793430d62e
parentd3114a96da64de8ea987f7c1714f8ad4a2474f4e (diff)
downloadhdf5-451a91e53bdc0f930c2acf382d14a5e2fd9cb2d9.zip
hdf5-451a91e53bdc0f930c2acf382d14a5e2fd9cb2d9.tar.gz
hdf5-451a91e53bdc0f930c2acf382d14a5e2fd9cb2d9.tar.bz2
[svn-r26594] Merge macros and fortran changes from dual_binary feature.
Tested: local linux
-rw-r--r--CMakeFilters.cmake20
-rw-r--r--CMakeLists.txt2
-rw-r--r--c++/examples/CMakeLists.txt4
-rw-r--r--c++/src/CMakeLists.txt2
-rw-r--r--c++/test/CMakeLists.txt2
-rw-r--r--config/cmake/H5pubconf.h.in4
-rw-r--r--config/cmake/cacheinit.cmake4
-rw-r--r--config/cmake/hdf5-config.cmake.in65
-rw-r--r--examples/CMakeLists.txt4
-rw-r--r--fortran/examples/CMakeLists.txt49
-rw-r--r--fortran/src/CMakeLists.txt143
-rw-r--r--fortran/test/CMakeLists.txt58
-rw-r--r--fortran/testpar/CMakeLists.txt5
-rw-r--r--hl/c++/examples/CMakeLists.txt2
-rw-r--r--hl/c++/src/CMakeLists.txt2
-rw-r--r--hl/c++/test/CMakeLists.txt2
-rw-r--r--hl/examples/CMakeLists.txt2
-rw-r--r--hl/fortran/examples/CMakeLists.txt4
-rw-r--r--hl/fortran/src/CMakeLists.txt48
-rw-r--r--hl/fortran/test/CMakeLists.txt12
-rw-r--r--hl/src/CMakeLists.txt2
-rw-r--r--hl/test/CMakeLists.txt4
-rw-r--r--hl/tools/CMakeLists.txt6
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/H5api_adpt.h189
-rw-r--r--test/CMakeLists.txt26
-rw-r--r--test/CMakeTests.cmake2
-rw-r--r--test/flush2.c4
-rw-r--r--testpar/CMakeLists.txt4
-rw-r--r--tools/h5copy/CMakeLists.txt4
-rw-r--r--tools/h5diff/CMakeLists.txt6
-rw-r--r--tools/h5dump/CMakeLists.txt4
-rw-r--r--tools/h5import/CMakeLists.txt4
-rw-r--r--tools/h5jam/CMakeLists.txt10
-rw-r--r--tools/h5ls/CMakeLists.txt2
-rw-r--r--tools/h5repack/CMakeLists.txt8
-rw-r--r--tools/h5stat/CMakeLists.txt4
-rw-r--r--tools/lib/CMakeLists.txt4
-rw-r--r--tools/misc/CMakeLists.txt10
-rw-r--r--tools/perform/CMakeLists.txt30
40 files changed, 306 insertions, 459 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 3a2bec4..7050f87 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -1,16 +1,4 @@
-#-----------------------------------------------------------------------------
-# Options for HDF5 Filters
-#-----------------------------------------------------------------------------
-MACRO (HDF5_SETUP_FILTERS FILTER)
- option (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
- if (HDF5_USE_FILTER_${FILTER})
- set (H5_HAVE_FILTER_${FILTER} 1)
- set (FILTERS "${FILTERS} ${FILTER}")
- endif (HDF5_USE_FILTER_${FILTER})
- # message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
-ENDMACRO (HDF5_SETUP_FILTERS)
-
include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
@@ -43,6 +31,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
if (NOT ZLIB_FOUND)
find_package (ZLIB) # Legacy find
+ if (ZLIB_FOUND)
+ set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
+ endif (ZLIB_FOUND)
endif (NOT ZLIB_FOUND)
endif (NOT ZLIB_USE_EXTERNAL)
if (ZLIB_FOUND)
@@ -51,7 +42,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (H5_HAVE_LIBZ 1)
set (H5_ZLIB_HEADER "zlib.h")
set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
- set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+ set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
else (ZLIB_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
@@ -87,6 +78,9 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
+ if (SZIP_FOUND)
+ set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
+ endif (SZIP_FOUND)
endif (NOT SZIP_FOUND)
endif (NOT SZIP_USE_EXTERNAL)
if (SZIP_FOUND)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a487c4..a6994ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -283,8 +283,8 @@ if (BUILD_SHARED_LIBS)
else (BUILD_SHARED_LIBS)
set (H5_BUILT_AS_STATIC_LIB 1)
set (H5_ENABLE_STATIC_LIB YES)
- set (CMAKE_POSITION_INDEPENDENT_CODE ON)
endif (BUILD_SHARED_LIBS)
+set (CMAKE_POSITION_INDEPENDENT_CODE ON)
#-----------------------------------------------------------------------------
# Option to Build Static executables
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 5ea51a4..ff375f3 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -35,7 +35,7 @@ set (tutr_examples
foreach (example ${examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
- TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
+ TARGET_C_PROPERTIES (cpp_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
endforeach (example ${examples})
@@ -43,7 +43,7 @@ endforeach (example ${examples})
foreach (example ${tutr_examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
- TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
+ TARGET_C_PROPERTIES (cpp_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
endforeach (example ${tutr_examples})
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 513bbb6..2f3a0c4 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -84,7 +84,7 @@ set (CPP_HDRS
)
add_library (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
-TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE})
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index fe463fa..dcdf3a3 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -36,7 +36,7 @@ configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @O
add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} )
TARGET_NAMING (cpp_testhdf5 ${LIB_TYPE})
-TARGET_C_PROPERTIES (cpp_testhdf5 " " " ")
+TARGET_C_PROPERTIES (cpp_testhdf5 ${LIB_TYPE} " " " ")
target_link_libraries (cpp_testhdf5
${HDF5_CPP_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 3c7c893..63eb23f 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -50,10 +50,6 @@
/* Define if C++ compiler recognizes offsetof */
#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@
-/* Define a macro for Cygwin (on XP only) where the compiler has rounding
- problem converting from unsigned long long to long double */
-#cmakedefine H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM @H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM@
-
/* Define the default plugins path to compile */
#cmakedefine H5_DEFAULT_PLUGINDIR "@H5_DEFAULT_PLUGINDIR@"
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index a18395f..87d4fcc 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -14,10 +14,6 @@ set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
-set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
-
-set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
-
set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index ea61b18..1b4de77 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -5,6 +5,16 @@
string(TOUPPER @HDF5_PACKAGE@ HDF5_PACKAGE_NAME)
+set (${HDF5_PACKAGE_NAME}_VALID_COMPONENTS
+ C
+ CXX
+ Fortran
+ HL
+ CXX_HL
+ Fortran_HL
+ Tools
+)
+
#-----------------------------------------------------------------------------
# User Options
#-----------------------------------------------------------------------------
@@ -19,7 +29,7 @@ set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
set (${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
-set (${HDF5_PACKAGE_NAME}_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@)
+set (${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@)
#-----------------------------------------------------------------------------
# Dependencies
@@ -86,4 +96,55 @@ if (NOT TARGET "@HDF5_PACKAGE@")
set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
endif ()
-check_required_components(hdf5)
+# Handle default component :
+if (NOT ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
+ set (${HDF5_PACKAGE_NAME}_FIND_COMPONENTS C)
+ set (${HDF5_PACKAGE_NAME}_FIND_REQUIRED_C true)
+endif ()
+
+# Handle requested components:
+list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
+foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
+ list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
+endforeach ()
+ foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
+ set (hdf5_comp2)
+ if (${comp} MATCHES "C")
+ set (hdf5_comp "hdf5")
+ elseif (${comp} MATCHES "CXX")
+ set (hdf5_comp "hdf5_cpp")
+ elseif (${comp} MATCHES "HL")
+ set (hdf5_comp "hdf5_hl")
+ elseif (${comp} MATCHES "CXX_HL")
+ set (hdf5_comp "hdf5_hl_cpp")
+ elseif (${comp} MATCHES "Tools")
+ set (hdf5_comp "hdf5_tools")
+ elseif (${comp} MATCHES "Fortran")
+ set (hdf5_comp2 "hdf5_f90cstub")
+ set (hdf5_comp "hdf5_fortran")
+ elseif (${comp} MATCHES "Fortran_HL")
+ set (hdf5_comp2 "hdf5_hl_f90cstub")
+ set (hdf5_comp "hdf5_hl_fortran")
+ endif ()
+ list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}" HAVE_COMP)
+ if (${HAVE_COMP} LESS 0)
+ set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0)
+ else ()
+ if (hdf5_comp2)
+ list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}" HAVE_COMP2)
+ if (${HAVE_COMP2} LESS 0)
+ set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0)
+ else ()
+ set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1)
+ string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY)
+ set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp2} ${hdf5_comp})
+ endif ()
+ else ()
+ set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1)
+ string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY)
+ set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp})
+ endif ()
+ endforeach ()
+endforeach ()
+
+check_required_components(${HDF5_PACKAGE_NAME})
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index da8174b..1f33f04 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -39,7 +39,7 @@ set (examples
foreach (example ${examples})
add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
TARGET_NAMING (${example} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${example} " " " ")
+ TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ")
target_link_libraries (${example} ${HDF5_LIB_TARGET})
set_target_properties (${example} PROPERTIES FOLDER examples)
endforeach (example ${examples})
@@ -47,7 +47,7 @@ endforeach (example ${examples})
if (H5_HAVE_PARALLEL)
add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
TARGET_NAMING (ph5example ${LIB_TYPE})
- TARGET_C_PROPERTIES (ph5example " " " ")
+ TARGET_C_PROPERTIES (ph5example ${LIB_TYPE} " " " ")
target_link_libraries (ph5example ${HDF5_LIB_TARGET})
set_target_properties (ph5example PROPERTIES FOLDER examples)
endif (H5_HAVE_PARALLEL)
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 1f59f32..2bf0bf6 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -8,7 +8,7 @@ PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Define Sources
@@ -41,57 +41,52 @@ set (F2003_examples
foreach (example ${examples})
add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f90_ex_${example} ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (f90_ex_${example} " " " ")
- if (WIN32)
- set_property (TARGET f90_ex_${example}
- APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
- )
- endif (WIN32)
+ TARGET_FORTRAN_PROPERTIES (f90_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (f90_ex_${example} PROPERTIES FOLDER examples/fortran)
+ target_include_directories (f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ set_target_properties (f90_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+ )
endforeach (example ${examples})
if (HDF5_ENABLE_F2003)
foreach (example ${F2003_examples})
add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f03_ex_${example} ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (f03_ex_${example} " " " ")
- if (WIN32)
- set_property (TARGET f03_ex_${example}
- APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS
- )
- endif (WIN32)
+ TARGET_FORTRAN_PROPERTIES (f03_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (f03_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (f03_ex_${example} PROPERTIES FOLDER examples/fortran03)
+ target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ set_target_properties (f03_ex_${example} PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran03
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+ )
endforeach (example ${F2003_examples})
endif (HDF5_ENABLE_F2003)
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example " " " ")
- if (WIN32)
- set_property (TARGET f90_ex_ph5example
- APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
- )
- endif (WIN32)
+ TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example ${LIB_TYPE} " " " ")
target_link_libraries (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
${MPI_Fortran_LIBRARIES}
)
- set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (f90_ex_ph5example PROPERTIES FOLDER examples/fortran)
+ target_include_directories (f90_ex_ph5example PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ set_target_properties (f90_ex_ph5example PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER examples/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+ )
endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
if (BUILD_TESTING)
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 22a091e..c015072 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -54,7 +54,10 @@ if (WIN32 AND MSVC)
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
endif (WIN32 AND MSVC)
-set_target_properties (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (H5test_FortranHavekind PROPERTIES
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+)
set (CMD $<TARGET_FILE:H5test_FortranHavekind>)
add_custom_command (
@@ -142,7 +145,7 @@ set (f90CStub_C_HDRS
)
add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
-TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} ${LIB_TYPE})
@@ -247,8 +250,7 @@ if (WIN32)
HDF5F90_WINDOWS
)
endif (WIN32)
-TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
-set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
+TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS})
target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_link_libraries (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES})
@@ -259,6 +261,7 @@ set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
#-----------------------------------------------------------------------------
@@ -278,100 +281,50 @@ install (
)
if (WIN32)
- install (
- FILES
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5fortran_types.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/hdf5.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5global.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5a.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5d.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5e.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5f.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5g.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5i.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5l.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lib.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5o.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5p.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5r.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5s.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5t.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5z.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5a_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5d_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5e_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5f_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5l_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lib_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5o_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5p_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5r_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5t_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5_dble_interface.mod
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- fortheaders
- )
- if (H5_TEST_KIND_NAME)
- install (
- FILES
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/${H5_TEST_KIND_NAME}.mod
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- fortheaders
- )
- endif (H5_TEST_KIND_NAME)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE})
else (WIN32)
- install (
- FILES
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5fortran_types.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/hdf5.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5global.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5f.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5a.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5d.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5e.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5f.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5g.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5i.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5l.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lib.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5o.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5p.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5r.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5s.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5t.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5z.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5a_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5d_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5e_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5f_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5l_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lib_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5o_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5p_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5r_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5t_provisional.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5_dble_interface.mod
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- fortheaders
- )
- if (H5_TEST_KIND_NAME)
- install (
- FILES
- ${CMAKE_Fortran_MODULE_DIRECTORY}/${H5_TEST_KIND_NAME}.mod
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- fortheaders
- )
- endif (H5_TEST_KIND_NAME)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY})
endif (WIN32)
+set (mod_files
+ ${MOD_BUILD_DIR}/h5fortran_types.mod
+ ${MOD_BUILD_DIR}/hdf5.mod
+ ${MOD_BUILD_DIR}/h5global.mod
+ ${MOD_BUILD_DIR}/h5a.mod
+ ${MOD_BUILD_DIR}/h5d.mod
+ ${MOD_BUILD_DIR}/h5e.mod
+ ${MOD_BUILD_DIR}/h5f.mod
+ ${MOD_BUILD_DIR}/h5g.mod
+ ${MOD_BUILD_DIR}/h5i.mod
+ ${MOD_BUILD_DIR}/h5l.mod
+ ${MOD_BUILD_DIR}/h5lib.mod
+ ${MOD_BUILD_DIR}/h5o.mod
+ ${MOD_BUILD_DIR}/h5p.mod
+ ${MOD_BUILD_DIR}/h5r.mod
+ ${MOD_BUILD_DIR}/h5s.mod
+ ${MOD_BUILD_DIR}/h5t.mod
+ ${MOD_BUILD_DIR}/h5z.mod
+ ${MOD_BUILD_DIR}/h5a_provisional.mod
+ ${MOD_BUILD_DIR}/h5d_provisional.mod
+ ${MOD_BUILD_DIR}/h5e_provisional.mod
+ ${MOD_BUILD_DIR}/h5f_provisional.mod
+ ${MOD_BUILD_DIR}/h5l_provisional.mod
+ ${MOD_BUILD_DIR}/h5lib_provisional.mod
+ ${MOD_BUILD_DIR}/h5o_provisional.mod
+ ${MOD_BUILD_DIR}/h5p_provisional.mod
+ ${MOD_BUILD_DIR}/h5r_provisional.mod
+ ${MOD_BUILD_DIR}/h5t_provisional.mod
+ ${MOD_BUILD_DIR}/h5_dble_interface.mod
+)
+install (
+ FILES
+ ${mod_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT
+ fortheaders
+)
+
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 3395906..2893156 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -4,14 +4,14 @@ PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Add Test Lib
#-----------------------------------------------------------------------------
add_library (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
-TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_C_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
@@ -46,8 +46,7 @@ if (WIN32)
endif (BUILD_SHARED_LIBS)
set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS)
endif (WIN32)
-TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
-set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
+TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS})
target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -58,6 +57,7 @@ set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/fortran
LINKER_LANGUAGE Fortran
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
#-----------------------------------------------------------------------------
@@ -83,7 +83,7 @@ add_executable (testhdf5_fortran
tHDF5.f90
)
TARGET_NAMING (testhdf5_fortran ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (testhdf5_fortran " " " ")
+TARGET_FORTRAN_PROPERTIES (testhdf5_fortran ${LIB_TYPE} " " " ")
target_link_libraries (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -92,8 +92,12 @@ target_link_libraries (testhdf5_fortran
if (WIN32 AND MSVC)
target_link_libraries (testhdf5_fortran "ws2_32.lib")
endif (WIN32 AND MSVC)
-set_target_properties (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (testhdf5_fortran PROPERTIES FOLDER test/fortran)
+target_include_directories (testhdf5_fortran PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+set_target_properties (testhdf5_fortran PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+)
#-- Adding test for testhdf5_fortran_1_8
add_executable (testhdf5_fortran_1_8
@@ -105,7 +109,7 @@ add_executable (testhdf5_fortran_1_8
tHDF5_1_8.f90
)
TARGET_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 " " " ")
+TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 ${LIB_TYPE} " " " ")
target_link_libraries (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -114,8 +118,12 @@ target_link_libraries (testhdf5_fortran_1_8
if (WIN32 AND MSVC)
target_link_libraries (testhdf5_fortran_1_8 "ws2_32.lib")
endif (WIN32 AND MSVC)
-set_target_properties (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (testhdf5_fortran_1_8 PROPERTIES FOLDER test/fortran)
+target_include_directories (testhdf5_fortran_1_8 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+set_target_properties (testhdf5_fortran_1_8 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+)
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_F2003)
@@ -130,7 +138,7 @@ if (HDF5_ENABLE_F2003)
tHDF5_F03.f90
)
TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 " " " ")
+ TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 ${LIB_TYPE} " " " ")
target_link_libraries (fortranlib_test_F03
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -139,14 +147,18 @@ if (HDF5_ENABLE_F2003)
if (WIN32 AND MSVC)
target_link_libraries (fortranlib_test_F03 "ws2_32.lib")
endif (WIN32 AND MSVC)
- set_target_properties (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran)
- set_target_properties (fortranlib_test_F03 PROPERTIES FOLDER test/fortran)
+ target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ set_target_properties (fortranlib_test_F03 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+ )
endif (HDF5_ENABLE_F2003)
#-- Adding test for fflush1
add_executable (fflush1 fflush1.f90)
TARGET_NAMING (fflush1 ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (fflush1 " " " ")
+TARGET_FORTRAN_PROPERTIES (fflush1 ${LIB_TYPE} " " " ")
target_link_libraries (fflush1
${HDF5_F90_LIB_TARGET}
${HDF5_F90_TEST_LIB_TARGET}
@@ -155,13 +167,17 @@ target_link_libraries (fflush1
if (WIN32 AND MSVC)
target_link_libraries (fflush1 "ws2_32.lib")
endif (WIN32 AND MSVC)
-set_target_properties (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (fflush1 PROPERTIES FOLDER test/fortran)
+target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+set_target_properties (fflush1 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+)
#-- Adding test for fflush2
add_executable (fflush2 fflush2.f90)
TARGET_NAMING (fflush2 ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (fflush2 " " " ")
+TARGET_FORTRAN_PROPERTIES (fflush2 ${LIB_TYPE} " " " ")
target_link_libraries (fflush2
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -170,7 +186,11 @@ target_link_libraries (fflush2
if (WIN32 AND MSVC)
target_link_libraries (fflush2 "ws2_32.lib")
endif (WIN32 AND MSVC)
-set_target_properties (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (fflush2 PROPERTIES FOLDER test/fortran)
+target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+set_target_properties (fflush2 PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+)
include (CMakeTests.cmake)
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index dfe9ce7..98ef6c8 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Add Tests
@@ -17,7 +17,7 @@ add_executable (parallel_test
mdset.f90
)
TARGET_NAMING (parallel_test ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (parallel_test " " " ")
+TARGET_FORTRAN_PROPERTIES (parallel_test ${LIB_TYPE} " " " ")
target_link_libraries (parallel_test
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -27,6 +27,7 @@ target_link_libraries (parallel_test
if (WIN32 AND MSVC)
target_link_libraries (parallel_test "ws2_32.lib")
endif (WIN32 AND MSVC)
+target_include_directories (parallel_test PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (parallel_test PROPERTIES FOLDER test/fortran)
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 12c1d50..e3fc3ae 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -12,7 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
# --------------------------------------------------------------------
add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
TARGET_NAMING (ptExampleFL ${LIB_TYPE})
-TARGET_C_PROPERTIES (ptExampleFL " " " ")
+TARGET_C_PROPERTIES (ptExampleFL ${LIB_TYPE} " " " ")
target_link_libraries (
ptExampleFL
${HDF5_HL_CPP_LIB_TARGET}
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 0dee06f..640cb2d 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -11,7 +11,7 @@ set (HDF5_HL_CPP_SRCS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h)
add_library (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_CPP_SRCS})
-TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (
${HDF5_HL_CPP_LIB_TARGET}
${HDF5_HL_LIB_TARGET}
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index d4e1157..ff06b22 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -16,7 +16,7 @@ INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test)
INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
-TARGET_C_PROPERTIES (hl_ptableTest " " " ")
+TARGET_C_PROPERTIES (hl_ptableTest ${LIB_TYPE} " " " ")
TARGET_NAMING (hl_ptableTest ${LIB_TYPE})
target_link_libraries (
hl_ptableTest
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index edcb920..e264f75 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -29,7 +29,7 @@ set (examples
foreach (example ${examples})
add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
TARGET_NAMING (hl_ex_${example} ${LIB_TYPE})
- TARGET_C_PROPERTIES (hl_ex_${example} " " " ")
+ TARGET_C_PROPERTIES (hl_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl)
endforeach (example ${examples})
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index bf6a0ca..bded2d9 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -5,7 +5,6 @@ PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran)
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (
- ${CMAKE_Fortran_MODULE_DIRECTORY}
${HDF5_F90_BINARY_DIR}
${HDF5_F90_SRC_DIR}/src
)
@@ -18,12 +17,13 @@ set (examples
foreach (example ${examples})
add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (hl_f90_ex_${example} ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} " " " ")
+ TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (hl_f90_ex_${example}
${HDF5_HL_F90_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
+ target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index f188a53..6e6e44a 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -8,7 +8,6 @@ INCLUDE_DIRECTORIES (
${HDF5_HL_SRC_DIR}/src
${HDF5_F90_SRC_DIR}/src
${HDF5_F90_BINARY_DIR}
- ${CMAKE_Fortran_MODULE_DIRECTORY}
)
#-----------------------------------------------------------------------------
@@ -26,7 +25,7 @@ set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C)
set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
add_library (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE})
@@ -66,8 +65,7 @@ if (WIN32)
HDF5F90_WINDOWS
)
endif (WIN32)
-TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
-set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
+TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS})
target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE})
@@ -75,37 +73,35 @@ set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE Fortran
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
+
if (WIN32)
- install (
- FILES
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5ds.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5tb.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lt.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5im.mod
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- fortheaders
- )
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE})
else (WIN32)
- install (
- FILES
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5ds.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5tb.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lt.mod
- ${CMAKE_Fortran_MODULE_DIRECTORY}/h5im.mod
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- fortheaders
- )
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY})
endif (WIN32)
+set (mod_files
+ ${MOD_BUILD_DIR}/h5ds.mod
+ ${MOD_BUILD_DIR}/h5tb.mod
+ ${MOD_BUILD_DIR}/h5lt.mod
+ ${MOD_BUILD_DIR}/h5im.mod
+)
+
+install (
+ FILES
+ ${mod_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT
+ fortheaders
+)
+
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index fcb0b8c..55fb987 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -9,32 +9,36 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
#-- Adding test for hl_f90_tstds
add_executable (hl_f90_tstds tstds.f90)
TARGET_NAMING (hl_f90_tstds ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstds " " " ")
+TARGET_FORTRAN_PROPERTIES (hl_f90_tstds ${LIB_TYPE} " " " ")
target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tstlite
add_executable (hl_f90_tstlite tstlite.f90)
TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite " " " ")
+TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite ${LIB_TYPE} " " " ")
target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tstimage
add_executable (hl_f90_tstimage tstimage.f90)
TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage " " " ")
+TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage ${LIB_TYPE} " " " ")
target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tsttable
add_executable (hl_f90_tsttable tsttable.f90)
TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable " " " ")
+TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable ${LIB_TYPE} " " " ")
target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index f4d5a96..3c24e40 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -34,7 +34,7 @@ set (HL_HEADERS
)
add_library (${HDF5_HL_LIB_TARGET} ${LIB_TYPE} ${HL_SRCS} ${HL_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} ${LIB_TYPE})
set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 28c716c..b564854 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
MACRO (HL_ADD_EXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
TARGET_NAMING (hl_${hl_name} ${LIB_TYPE})
- TARGET_C_PROPERTIES (hl_${hl_name} " " " ")
+ TARGET_C_PROPERTIES (hl_${hl_name} ${LIB_TYPE} " " " ")
target_link_libraries (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -46,7 +46,7 @@ HL_ADD_EXE (test_table)
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (hl_gen_test_ds gen_test_ds.c)
TARGET_NAMING (hl_gen_test_ds ${LIB_TYPE})
- TARGET_C_PROPERTIES (hl_gen_test_ds " " " ")
+ TARGET_C_PROPERTIES (hl_gen_test_ds ${LIB_TYPE} " " " ")
target_link_libraries (hl_gen_test_ds
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 567b3da..30baeda 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5)
add_executable (gif2h5 ${GIF2H5_SRCS})
TARGET_NAMING (gif2h5 ${LIB_TYPE})
-TARGET_C_PROPERTIES (gif2h5 " " " ")
+TARGET_C_PROPERTIES (gif2h5 ${LIB_TYPE} " " " ")
target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
@@ -30,7 +30,7 @@ set (hdf2gif_SRCS
)
add_executable (h52gif ${hdf2gif_SRCS})
TARGET_NAMING (h52gif ${LIB_TYPE})
-TARGET_C_PROPERTIES (h52gif " " " ")
+TARGET_C_PROPERTIES (h52gif ${LIB_TYPE} " " " ")
target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
@@ -43,7 +43,7 @@ if (BUILD_TESTING)
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
TARGET_NAMING (hl_h52gifgentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (hl_h52gifgentest " " " ")
+ TARGET_C_PROPERTIES (hl_h52gifgentest ${LIB_TYPE} " " " ")
target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 999420c..68f7847 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -771,14 +771,14 @@ set (H5_PRIVATE_HEADERS
# specific type checks inside
#-----------------------------------------------------------------------------
#add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
-#TARGET_C_PROPERTIES (H5detect " " " ")
+#TARGET_C_PROPERTIES (H5detect STATIC " " " ")
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
SET (LOCAL_OPT_FLAG "-O0")
ELSE (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
SET (LOCAL_OPT_FLAG " ")
ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
-TARGET_C_PROPERTIES (H5detect ${LOCAL_OPT_FLAG} " ")
+TARGET_C_PROPERTIES (H5detect STATIC ${LOCAL_OPT_FLAG} " ")
if (MSVC OR MINGW)
target_link_libraries (H5detect "ws2_32.lib")
@@ -793,7 +793,7 @@ add_custom_command (
)
add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
-TARGET_C_PROPERTIES (H5make_libsettings " " " ")
+TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5make_libsettings "ws2_32.lib")
endif (MSVC OR MINGW)
@@ -860,7 +860,7 @@ set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h)
set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED)
add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS})
if (NOT WIN32)
target_link_libraries (${HDF5_LIB_TARGET} dl)
diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h
index 845a9a0..9b00bd9 100644
--- a/src/H5api_adpt.h
+++ b/src/H5api_adpt.h
@@ -24,56 +24,6 @@
/* This will only be defined if HDF5 was built with CMake */
#ifdef H5_BUILT_AS_DYNAMIC_LIB
-#if defined (hdf5_EXPORTS)
- #define _HDF5DLL_
-#else
- #define _HDF5USEDLL_
-#endif
-
-#if defined (hdf5_test_EXPORTS)
- #define _HDF5TESTDLL_
-#else
- #define _HDF5TESTUSEDLL_
-#endif
-
-#if defined (hdf5_tools_EXPORTS)
- #define _HDF5TOOLSDLL_
-#else
- #define _HDF5TOOLSUSEDLL_
-#endif
-
-#if defined (hdf5_cpp_EXPORTS)
- #define HDF5_CPPDLL_EXPORTS
-#else
- #define HDF5CPP_USEDLL
-#endif
-
-#if defined (hdf5_hl_EXPORTS)
- #define _HDF5_HLDLL_EXPORTS_
-#else
- #define _HDF5USEHLDLL_
-#endif
-
-#if defined (hdf5_hl_cpp_EXPORTS)
- #define HDF5_HL_CPPDLL_EXPORTS
-#else
- #define HDF5USE_HLCPPDLL
-#endif
-
-#if defined (hdf5_f90cstub_EXPORTS)
- #define HDF5FORT_CSTUB_DLL_EXPORTS
-#else
- #define HDF5FORT_CSTUB_USEDLL
-#endif
-
-#if defined (hdf5_test_f90cstub_EXPORTS)
- #define HDF5FORTTEST_CSTUB_DLL_EXPORTS
-#endif
-
-#if defined (hdf5_hl_f90cstub_EXPORTS)
- #define HDF5_HL_F90CSTUBDLL_EXPORTS
-#endif
-
#if defined(hdf5_EXPORTS)
#if defined (_MSC_VER) /* MSVC Compiler Case */
#define H5_DLL __declspec(dllexport)
@@ -281,144 +231,25 @@
#define HDF5_HL_F90CSTUBDLLVAR extern
#endif /* HDF5_HL_F90CSTUBDLL */
-#elif defined(H5_BUILT_AS_STATIC_LIB)
+#else
#define H5_DLL
- #define H5_HLDLL
- #define H5_HLCPPDLL
- #define HDF5_HL_F90CSTUBDLL
#define H5_DLLVAR extern
- #define H5_DLLCPP
#define H5TEST_DLL
#define H5TEST_DLLVAR extern
#define H5TOOLS_DLL
#define H5TOOLS_DLLVAR extern
+ #define H5_DLLCPP
+ #define H5_DLLCPPVAR extern
+ #define H5_HLDLL
+ #define H5_HLDLLVAR extern
+ #define H5_HLCPPDLL
+ #define H5_HLCPPDLLVAR extern
#define H5_FCDLL
#define H5_FCDLLVAR extern
#define H5_FCTESTDLL
#define H5_FCTESTDLLVAR extern
-
-#else
-/* This is the original HDFGroup defined preprocessor code which should still work
- * with the VS projects that are maintained by "The HDF Group"
- * The Visual Studio project files will not be supported in the next major release of 1.10.
- */
-
-#if defined(H5_HAVE_WIN32_API)
-
-#if defined(_HDF5DLL_)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
-#define H5_DLL __declspec(dllexport)
-#define H5_DLLVAR extern __declspec(dllexport)
-#elif defined(_HDF5USEDLL_)
-#define H5_DLL __declspec(dllimport)
-#define H5_DLLVAR __declspec(dllimport)
-#else
-#define H5_DLL
-#define H5_DLLVAR extern
-#endif /* _HDF5DLL_ */
-
-#if defined(_HDF5TESTDLL_)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
-#define H5TEST_DLL __declspec(dllexport)
-#define H5TEST_DLLVAR extern __declspec(dllexport)
-#elif defined(_HDF5TESTUSEDLL_)
-#define H5TEST_DLL __declspec(dllimport)
-#define H5TEST_DLLVAR __declspec(dllimport)
-#else
-#define H5TEST_DLL
-#define H5TEST_DLLVAR extern
-#endif /* _HDF5TESTDLL_ */
-
-#if defined(_HDF5TOOLSDLL_)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
-#define H5TOOLS_DLL __declspec(dllexport)
-#define H5TOOLS_DLLVAR extern __declspec(dllexport)
-#elif defined(_HDF5TOOLSUSEDLL_)
-#define H5TOOLS_DLL __declspec(dllimport)
-#define H5TOOLS_DLLVAR __declspec(dllimport)
-#else
-#define H5TOOLS_DLL
-#define H5TOOLS_DLLVAR extern
-#endif /* _HDF5TOOLSDLL_ */
-
-#if defined(_HDF5_HLDLL_EXPORTS_)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
-#define H5_HLDLL __declspec(dllexport)
-#elif defined(_HDF5USEHLDLL_)
-#define H5_HLDLL __declspec(dllimport)
-#else
-#define H5_HLDLL
-#endif /* _HDF5_HLDLL_EXPORTS */
-
-#if defined(HDF5_HL_CPPDLL_EXPORTS)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
-#define H5_HLCPPDLL __declspec(dllexport)
-#elif defined(HDF5USE_HLCPPDLL)
-#define H5_HLCPPDLL __declspec(dllimport)
-#else
-#define H5_HLCPPDLL
-#endif /*HDF5_HL_CPPDLL_EXPORTS*/
-
-#if defined(HDF5_HL_F90CSTUBDLL_EXPORTS)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
-#define HDF5_HL_F90CSTUBDLL __declspec(dllexport)
-#elif defined(HDF5USE_HLF90CSTUBDLL)
-#define HDF5_HL_F90CSTUBDLL __declspec(dllimport)
-#else
-#define HDF5_HL_F90CSTUBDLL
-#endif /*HDF5_HL_F90CSTUBDLL_EXPORTS*/
-
-
-#if defined(HDF5FORT_CSTUB_DLL_EXPORTS)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
-#define H5_FCDLL __declspec(dllexport)
-#define H5_FCDLLVAR extern __declspec(dllexport)
-#elif defined(HDF5FORT_CSTUB_USEDLL)
-#define H5_FCDLL __declspec(dllimport)
-#define H5_FCDLLVAR __declspec(dllimport)
-#else
-#define H5_FCDLL
-#define H5_FCDLLVAR extern
-#endif /* _HDF5_FORTRANDLL_EXPORTS_ */
-
-#if defined(HDF5FORTTEST_CSTUB_DLL_EXPORTS)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
-#define H5_FCTESTDLL __declspec(dllexport)
-#define H5_FCTESTDLLVAR extern __declspec(dllexport)
-#elif defined(HDF5FORTTEST_CSTUB_USEDLL)
-#define H5_FCTESTDLL __declspec(dllimport)
-#define H5_FCTESTDLLVAR __declspec(dllimport)
-#else
-#define H5_FCTESTDLL
-#define H5_FCTESTDLLVAR extern
-#endif /* _HDF5_FORTRANDLL_EXPORTS_ */
-
-/* Added to export or to import C++ APIs - BMR (02-15-2002) */
-#if defined(HDF5_CPPDLL_EXPORTS) /* this name is generated at creation */
-#define H5_DLLCPP __declspec(dllexport)
-#elif defined(HDF5CPP_USEDLL)
-#define H5_DLLCPP __declspec(dllimport)
-#else
-#define H5_DLLCPP
-#endif /* HDF5_CPPDLL_EXPORTS */
-
-#else /*H5_HAVE_WIN32_API*/
-#define H5_DLL
-#define H5_HLDLL
-#define H5_HLCPPDLL
-#define HDF5_HL_F90CSTUBDLL
-#define H5_DLLVAR extern
-#define H5_DLLCPP
-#define H5TEST_DLL
-#define H5TEST_DLLVAR extern
-#define H5TOOLS_DLL
-#define H5TOOLS_DLLVAR extern
-#define H5_FCDLL
-#define H5_FCDLLVAR extern
-#define H5_FCTESTDLL
-#define H5_FCTESTDLLVAR extern
-#endif /*H5_HAVE_WIN32_API*/
+ #define HDF5_HL_F90CSTUBDLL
+ #define HDF5_HL_F90CSTUBDLLVAR extern
+#endif /* H5_BUILT_AS_DYNAMIC_LIB */
#endif /* H5API_ADPT_H */
-
-#endif /* */
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 83f82bd..05f59bb 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -27,7 +27,7 @@ set (TEST_LIB_HEADERS
)
add_library (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} " " " ")
if (MSVC)
target_link_libraries (${HDF5_TEST_LIB_TARGET} "ws2_32.lib")
endif (MSVC)
@@ -68,7 +68,7 @@ if (BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
- TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} " " " ")
+ TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
@@ -99,7 +99,7 @@ if (BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
- TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} " " " ")
+ TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
@@ -154,14 +154,14 @@ set (testhdf5_SRCS
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SRCS})
TARGET_NAMING (testhdf5 ${LIB_TYPE})
-TARGET_C_PROPERTIES (testhdf5 " " " ")
+TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ")
target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (testhdf5 PROPERTIES FOLDER test)
MACRO (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
TARGET_NAMING (${file} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${file} " " " ")
+ TARGET_C_PROPERTIES (${file} ${LIB_TYPE} " " " ")
target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${file} PROPERTIES FOLDER test)
ENDMACRO (ADD_H5_EXE file)
@@ -237,21 +237,21 @@ endforeach (test ${H5_TESTS})
#-- Adding test for cache
add_executable (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
TARGET_NAMING (cache ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache " " " ")
+TARGET_C_PROPERTIES (cache ${LIB_TYPE} " " " ")
target_link_libraries (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache PROPERTIES FOLDER test)
#-- Adding test for cache_api
add_executable (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
TARGET_NAMING (cache_api ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache_api " " " ")
+TARGET_C_PROPERTIES (cache_api ${LIB_TYPE} " " " ")
target_link_libraries (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache_api PROPERTIES FOLDER test)
#-- Adding test for cache_tagging
add_executable (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
TARGET_NAMING (cache_tagging ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache_tagging " " " ")
+TARGET_C_PROPERTIES (cache_tagging ${LIB_TYPE} " " " ")
target_link_libraries (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache_tagging PROPERTIES FOLDER test)
@@ -264,7 +264,7 @@ add_executable (ttsafe
${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
)
TARGET_NAMING (ttsafe ${LIB_TYPE})
-TARGET_C_PROPERTIES (ttsafe " " " ")
+TARGET_C_PROPERTIES (ttsafe ${LIB_TYPE} " " " ")
target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (ttsafe PROPERTIES FOLDER test)
@@ -272,7 +272,7 @@ set_target_properties (ttsafe PROPERTIES FOLDER test)
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
add_executable (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
TARGET_NAMING (err_compat ${LIB_TYPE})
- TARGET_C_PROPERTIES (err_compat " " " ")
+ TARGET_C_PROPERTIES (err_compat ${LIB_TYPE} " " " ")
target_link_libraries (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (err_compat PROPERTIES FOLDER test)
endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
@@ -280,14 +280,14 @@ endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
#-- Adding test for error_test
add_executable (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
TARGET_NAMING (error_test ${LIB_TYPE})
-TARGET_C_PROPERTIES (error_test " " " ")
+TARGET_C_PROPERTIES (error_test ${LIB_TYPE} " " " ")
target_link_libraries (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (error_test PROPERTIES FOLDER test)
#-- Adding test for links_env
add_executable (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
TARGET_NAMING (links_env ${LIB_TYPE})
-TARGET_C_PROPERTIES (links_env " " " ")
+TARGET_C_PROPERTIES (links_env ${LIB_TYPE} " " " ")
target_link_libraries (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (links_env PROPERTIES FOLDER test)
@@ -309,7 +309,7 @@ endif (\${TEST_RESULT} STREQUAL \"0\")
if (BUILD_SHARED_LIBS)
add_executable (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
TARGET_NAMING (plugin ${LIB_TYPE})
- TARGET_C_PROPERTIES (plugin " " " ")
+ TARGET_C_PROPERTIES (plugin ${LIB_TYPE} " " " ")
target_link_libraries (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
set_target_properties (plugin PROPERTIES FOLDER test)
endif (BUILD_SHARED_LIBS)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index f609b7a..7854b2a 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -728,7 +728,7 @@ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
MACRO (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
TARGET_NAMING (${genfile} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${genfile} " " " ")
+ TARGET_C_PROPERTIES (${genfile} ${LIB_TYPE} " " " ")
target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${genfile} PROPERTIES FOLDER generator/test)
ENDMACRO (ADD_H5_GENERATOR genfile)
diff --git a/test/flush2.c b/test/flush2.c
index 8108bba..28ce41e 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -186,7 +186,7 @@ main(void)
PASSED()
else
{
-#if defined H5_HAVE_WIN32_API && defined _HDF5USEDLL_
+#if defined H5_HAVE_WIN32_API && !defined (hdf5_EXPORTS)
SKIPPED();
puts(" DLL will flush the file even when calling _exit, skip this test temporarily");
#elif defined H5_VMS
@@ -209,7 +209,7 @@ main(void)
PASSED()
else
{
-#if defined H5_HAVE_WIN32_API && defined _HDF5USEDLL_
+#if defined H5_HAVE_WIN32_API && !defined (hdf5_EXPORTS)
SKIPPED();
puts(" DLL will flush the file even when calling _exit, skip this test temporarily");
#elif defined H5_VMS
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index d1db0b7..70e0246 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -29,14 +29,14 @@ set (testphdf5_SRCS
#-- Adding test for testhdf5
add_executable (testphdf5 ${testphdf5_SRCS})
TARGET_NAMING (testphdf5 ${LIB_TYPE})
-TARGET_C_PROPERTIES (testphdf5 " " " ")
+TARGET_C_PROPERTIES (testphdf5 ${LIB_TYPE} " " " ")
target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
MACRO (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
TARGET_NAMING (${file} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${file} " " " ")
+ TARGET_C_PROPERTIES (${file} ${LIB_TYPE} " " " ")
target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
set_target_properties (${file} PROPERTIES FOLDER test/par)
ENDMACRO (ADD_H5P_EXE file)
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 8c27536..fe258db 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c)
TARGET_NAMING (h5copy ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5copy " " " ")
+TARGET_C_PROPERTIES (h5copy ${LIB_TYPE} " " " ")
target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5copy PROPERTIES FOLDER tools)
@@ -21,7 +21,7 @@ if (BUILD_TESTING)
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c)
TARGET_NAMING (h5copygentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5copygentest " " " ")
+ TARGET_C_PROPERTIES (h5copygentest ${LIB_TYPE} " " " ")
target_link_libraries (h5copygentest ${HDF5_LIB_TARGET})
set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index f539d20..940602a 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -14,7 +14,7 @@ add_executable (h5diff
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
TARGET_NAMING (h5diff ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5diff " " " ")
+TARGET_C_PROPERTIES (h5diff ${LIB_TYPE} " " " ")
target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5diff PROPERTIES FOLDER tools)
@@ -26,7 +26,7 @@ if (H5_HAVE_PARALLEL)
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c
)
TARGET_NAMING (ph5diff ${LIB_TYPE})
- TARGET_C_PROPERTIES (ph5diff " " " ")
+ TARGET_C_PROPERTIES (ph5diff ${LIB_TYPE} " " " ")
target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (ph5diff PROPERTIES FOLDER tools)
endif (H5_HAVE_PARALLEL)
@@ -38,7 +38,7 @@ if (BUILD_TESTING)
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
TARGET_NAMING (h5diffgentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5diffgentest " " " ")
+ TARGET_C_PROPERTIES (h5diffgentest ${LIB_TYPE} " " " ")
target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET})
set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 4559ae3..9e4ab80c 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -15,7 +15,7 @@ add_executable (h5dump
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c
)
TARGET_NAMING (h5dump ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5dump " " " ")
+TARGET_C_PROPERTIES (h5dump ${LIB_TYPE} " " " ")
target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5dump PROPERTIES FOLDER tools)
@@ -28,7 +28,7 @@ if (BUILD_TESTING)
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
TARGET_NAMING (h5dumpgentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5dumpgentest " " " ")
+ TARGET_C_PROPERTIES (h5dumpgentest ${LIB_TYPE} " " " ")
target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 2ba2b78..bf1515e 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c)
TARGET_NAMING (h5import ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5import " " " ")
+TARGET_C_PROPERTIES (h5import ${LIB_TYPE} " " " ")
target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
#set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT)
set_target_properties (h5import PROPERTIES FOLDER tools)
@@ -24,7 +24,7 @@ if (BUILD_TESTING)
# --------------------------------------------------------------------
add_executable (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c)
TARGET_NAMING (h5importtest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5importtest " " " ")
+ TARGET_C_PROPERTIES (h5importtest ${LIB_TYPE} " " " ")
target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5importtest PROPERTIES FOLDER tools)
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index 412a2f0..4498132 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -11,25 +11,25 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
add_executable (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c)
TARGET_NAMING (h5jam ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5jam " " " ")
+TARGET_C_PROPERTIES (h5jam ${LIB_TYPE} " " " ")
target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5jam PROPERTIES FOLDER tools)
add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c)
TARGET_NAMING (getub ${LIB_TYPE})
-TARGET_C_PROPERTIES (getub " " " ")
+TARGET_C_PROPERTIES (getub ${LIB_TYPE} " " " ")
target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (getub PROPERTIES FOLDER tools)
add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c)
TARGET_NAMING (tellub ${LIB_TYPE})
-TARGET_C_PROPERTIES (tellub " " " ")
+TARGET_C_PROPERTIES (tellub ${LIB_TYPE} " " " ")
target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (tellub PROPERTIES FOLDER tools)
add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c)
TARGET_NAMING (h5unjam ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5unjam " " " ")
+TARGET_C_PROPERTIES (h5unjam ${LIB_TYPE} " " " ")
target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5unjam PROPERTIES FOLDER tools)
@@ -47,7 +47,7 @@ if (BUILD_TESTING)
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c)
TARGET_NAMING (h5jamgentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (testhdf5 " " " ")
+ TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ")
target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET})
set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools)
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 0d163ce..984b36b 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
#-----------------------------------------------------------------------------
add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c)
TARGET_NAMING (h5ls ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5ls " " " ")
+TARGET_C_PROPERTIES (h5ls ${LIB_TYPE} " " " ")
target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5ls PROPERTIES FOLDER tools)
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index f6c3050..718a478 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -22,7 +22,7 @@ set (REPACK_COMMON_SRCS
add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
TARGET_NAMING (h5repack ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5repack " " " ")
+TARGET_C_PROPERTIES (h5repack ${LIB_TYPE} " " " ")
target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5repack PROPERTIES FOLDER tools)
@@ -34,13 +34,13 @@ if (BUILD_TESTING)
# --------------------------------------------------------------------
add_executable (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
TARGET_NAMING (testh5repack_detect_szip ${LIB_TYPE})
- TARGET_C_PROPERTIES (testh5repack_detect_szip " " " ")
+ TARGET_C_PROPERTIES (testh5repack_detect_szip ${LIB_TYPE} " " " ")
target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools)
add_executable (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c)
TARGET_NAMING (h5repacktest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5repacktest " " " ")
+ TARGET_C_PROPERTIES (h5repacktest ${LIB_TYPE} " " " ")
target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (h5repacktest PROPERTIES FOLDER tools)
@@ -55,7 +55,7 @@ if (BUILD_TESTING)
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} dynlib_rpk.c)
- TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} " " " ")
+ TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME}
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 2969405..40c4d10 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
TARGET_NAMING (h5stat ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5stat " " " ")
+TARGET_C_PROPERTIES (h5stat ${LIB_TYPE} " " " ")
target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5stat PROPERTIES FOLDER tools)
@@ -24,7 +24,7 @@ if (BUILD_TESTING)
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
TARGET_NAMING (h5stat_gentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5stat_gentest " " " ")
+ TARGET_C_PROPERTIES (h5stat_gentest ${LIB_TYPE} " " " ")
target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET})
set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index 35ad46e..dbd72cd 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -38,14 +38,14 @@ set (H5_TOOLS_LIB_HDRS
)
add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
-TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} " " " ")
+TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
H5_SET_LIB_OPTIONS (
${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME}
${LIB_TYPE}
HDF5_TOOLS_LIB_NAME_RELEASE
- HDF5_TOOLS_LIB_NAME_DEBUG
+ HDF5_TOOLS_LIB_NAME_DEBUG
)
#set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG)
set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index 932948d..55ec833 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -12,19 +12,19 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
#-- Misc Executables
add_executable (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c)
TARGET_NAMING (h5debug ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5debug " " " ")
+TARGET_C_PROPERTIES (h5debug ${LIB_TYPE} " " " ")
target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5debug PROPERTIES FOLDER tools)
add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c)
TARGET_NAMING (h5repart ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5repart " " " ")
+TARGET_C_PROPERTIES (h5repart ${LIB_TYPE} " " " ")
target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5repart PROPERTIES FOLDER tools)
add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c)
TARGET_NAMING (h5mkgrp ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5mkgrp " " " ")
+TARGET_C_PROPERTIES (h5mkgrp ${LIB_TYPE} " " " ")
target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5mkgrp PROPERTIES FOLDER tools)
@@ -48,7 +48,7 @@ if (BUILD_TESTING)
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c)
TARGET_NAMING (h5repart_gentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5repart_gentest " " " ")
+ TARGET_C_PROPERTIES (h5repart_gentest ${LIB_TYPE} " " " ")
target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
@@ -56,7 +56,7 @@ if (BUILD_TESTING)
add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
TARGET_NAMING (h5repart_test ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5repart_test " " " ")
+ TARGET_C_PROPERTIES (h5repart_test ${LIB_TYPE} " " " ")
target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5repart_test PROPERTIES FOLDER tools)
diff --git a/tools/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt
index e6abf7f..17b40fa 100644
--- a/tools/perform/CMakeLists.txt
+++ b/tools/perform/CMakeLists.txt
@@ -22,7 +22,7 @@ set (h5perf_serial_SRCS
)
add_executable (h5perf_serial ${h5perf_serial_SRCS})
TARGET_NAMING (h5perf_serial ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5perf_serial " " " ")
+TARGET_C_PROPERTIES (h5perf_serial ${LIB_TYPE} " " " ")
target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5perf_serial PROPERTIES FOLDER perform)
@@ -33,13 +33,13 @@ if (HDF5_BUILD_PERFORM_STANDALONE)
${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c
)
add_executable (h5perf_serial_alone ${h5perf_serial_alone_SRCS})
- set_property (TARGET h5perf_serial_alone
- APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
- )
TARGET_NAMING (h5perf_serial_alone ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5perf_serial_alone " " " ")
+ TARGET_C_PROPERTIES (h5perf_serial_alone ${LIB_TYPE} " " " ")
target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform)
+ set_property (TARGET h5perf_serial_alone
+ APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
+ )
endif (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for chunk
@@ -48,7 +48,7 @@ set (chunk_SRCS
)
ADD_EXECUTABLE(chunk ${chunk_SRCS})
TARGET_NAMING (chunk ${LIB_TYPE})
-TARGET_C_PROPERTIES (chunk " " " ")
+TARGET_C_PROPERTIES (chunk ${LIB_TYPE} " " " ")
TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (chunk PROPERTIES FOLDER perform)
@@ -58,7 +58,7 @@ set (iopipe_SRCS
)
add_executable (iopipe ${iopipe_SRCS})
TARGET_NAMING (iopipe ${LIB_TYPE})
-TARGET_C_PROPERTIES (iopipe " " " ")
+TARGET_C_PROPERTIES (iopipe ${LIB_TYPE} " " " ")
target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (iopipe PROPERTIES FOLDER perform)
@@ -68,7 +68,7 @@ set (overhead_SRCS
)
add_executable (overhead ${overhead_SRCS})
TARGET_NAMING (overhead ${LIB_TYPE})
-TARGET_C_PROPERTIES (overhead " " " ")
+TARGET_C_PROPERTIES (overhead ${LIB_TYPE} " " " ")
target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (overhead PROPERTIES FOLDER perform)
@@ -79,7 +79,7 @@ if (BUILD_TESTING)
)
add_executable (perf_meta ${perf_meta_SRCS})
TARGET_NAMING (perf_meta ${LIB_TYPE})
- TARGET_C_PROPERTIES (perf_meta " " " ")
+ TARGET_C_PROPERTIES (perf_meta ${LIB_TYPE} " " " ")
target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (perf_meta PROPERTIES FOLDER perform)
endif (BUILD_TESTING)
@@ -90,7 +90,7 @@ set (zip_perf_SRCS
)
add_executable (zip_perf ${zip_perf_SRCS})
TARGET_NAMING (zip_perf ${LIB_TYPE})
-TARGET_C_PROPERTIES (zip_perf " " " ")
+TARGET_C_PROPERTIES (zip_perf ${LIB_TYPE} " " " ")
target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (zip_perf PROPERTIES FOLDER perform)
@@ -102,7 +102,7 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING)
)
add_executable (h5perf ${h5perf_SRCS})
TARGET_NAMING (h5perf ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5perf " " " ")
+ TARGET_C_PROPERTIES (h5perf ${LIB_TYPE} " " " ")
target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (h5perf PROPERTIES FOLDER perform)
@@ -113,13 +113,13 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING)
${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c
)
add_executable (h5perf_alone ${h5perf_alone_SRCS})
- set_property (TARGET h5perf_alone
- APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
- )
TARGET_NAMING (h5perf_alone ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5perf_alone " " " ")
+ TARGET_C_PROPERTIES (h5perf_alone ${LIB_TYPE} " " " ")
target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
+ set_property (TARGET h5perf_alone
+ APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
+ )
endif (HDF5_BUILD_PERFORM_STANDALONE)
endif (H5_HAVE_PARALLEL AND BUILD_TESTING)