summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c++/src/CMakeLists.txt2
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake34
-rw-r--r--fortran/src/CMakeLists.txt4
-rw-r--r--hl/c++/src/CMakeLists.txt2
-rw-r--r--hl/fortran/src/CMakeLists.txt4
-rw-r--r--hl/src/CMakeLists.txt2
-rw-r--r--java/examples/datasets/CMakeLists.txt3
-rw-r--r--java/examples/datatypes/CMakeLists.txt3
-rw-r--r--java/examples/groups/CMakeLists.txt3
-rw-r--r--java/examples/intro/CMakeLists.txt3
-rw-r--r--java/test/CMakeLists.txt3
-rw-r--r--release_docs/RELEASE.txt9
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--tools/lib/CMakeLists.txt2
14 files changed, 44 insertions, 32 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 8e7f8be..b141a5e 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -139,7 +139,7 @@ if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
endif ()
if (NOT ONLY_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
+ INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries)
endif ()
install (
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 9da5006..52b96fc 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -78,7 +78,7 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
if (${libtype} MATCHES "SHARED")
set (targetfilename $<TARGET_PDB_FILE:${libtarget}>)
else ()
- get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO)
+ get_property (target_name TARGET ${libtarget} PROPERTY $<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb)
endif ()
install (
@@ -86,9 +86,10 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
${targetfilename}
DESTINATION
${targetdestination}
- CONFIGURATIONS RelWithDebInfo
+ CONFIGURATIONS $<CONFIG>
COMPONENT ${targetcomponent}
- )
+ OPTIONAL
+ )
endif ()
endmacro ()
@@ -100,9 +101,10 @@ macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
$<TARGET_PDB_FILE:${progtarget}>
DESTINATION
${targetdestination}
- CONFIGURATIONS RelWithDebInfo
+ CONFIGURATIONS $<CONFIG>
COMPONENT ${targetcomponent}
- )
+ OPTIONAL
+ )
endif ()
endmacro ()
@@ -126,19 +128,6 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
endif ()
endif ()
- set_target_properties (${libtarget}
- PROPERTIES
- OUTPUT_NAME
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_DEBUG
- ${LIB_DEBUG_NAME}
- OUTPUT_NAME_RELEASE
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_MINSIZEREL
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_RELWITHDEBINFO
- ${LIB_RELEASE_NAME}
- )
if (${libtype} MATCHES "STATIC")
if (WIN32)
set_target_properties (${libtarget}
@@ -378,6 +367,15 @@ macro (HDF_DIR_PATHS package_prefix)
set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
endif ()
+ #set the default debug suffix for all library targets
+ if(NOT CMAKE_DEBUG_POSTFIX)
+ if (WIN32)
+ set (CMAKE_DEBUG_POSTFIX "_D")
+ else ()
+ set (CMAKE_DEBUG_POSTFIX "_debug")
+ endif ()
+ endif ()
+
SET_HDF_BUILD_TYPE()
#-----------------------------------------------------------------------------
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index f80eaa9..bfee43a 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -436,8 +436,8 @@ if (HDF5_EXPORTED_TARGETS)
#INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
endif ()
if (NOT ONLY_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
- #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
+ INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
+ #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
endif ()
install (
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index eb83d8c..1911d62 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -59,7 +59,7 @@ if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries)
endif ()
if (NOT ONLY_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries)
+ INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlcpplibraries)
endif ()
install (
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index a684088..b63b5c6 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -294,8 +294,8 @@ if (HDF5_EXPORTED_TARGETS)
#INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
endif ()
if (NOT ONLY_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
- #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
+ INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries)
+ #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries)
endif ()
install (
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 7125403..3cce7e4 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -83,7 +83,7 @@ if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_HL_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
endif ()
if (NOT ONLY_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
+ INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hllibraries)
endif ()
install (
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt
index c327c86..9e5c45c 100644
--- a/java/examples/datasets/CMakeLists.txt
+++ b/java/examples/datasets/CMakeLists.txt
@@ -72,7 +72,8 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH})
endforeach ()
macro (ADD_H5_TEST resultfile resultcode)
- set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$<TARGET_PROPERTY:${HDF5_JAVA_JNI_LIB_TARGET},OUTPUT_NAME$<$<CONFIG:Debug>:_DEBUG>>;")
+ get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY $<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
+ set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name};")
add_test (
NAME JAVA_datasets-${resultfile}
COMMAND "${CMAKE_COMMAND}"
diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt
index 0fef370..c939985 100644
--- a/java/examples/datatypes/CMakeLists.txt
+++ b/java/examples/datatypes/CMakeLists.txt
@@ -57,7 +57,8 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH})
endforeach ()
MACRO (ADD_H5_TEST resultfile resultcode)
- set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$<TARGET_PROPERTY:${HDF5_JAVA_JNI_LIB_TARGET},OUTPUT_NAME$<$<CONFIG:Debug>:_DEBUG>>;")
+ get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY $<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
+ set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name};")
add_test (
NAME JAVA_datatypes-${resultfile}
COMMAND "${CMAKE_COMMAND}"
diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt
index b31a186..489dab3 100644
--- a/java/examples/groups/CMakeLists.txt
+++ b/java/examples/groups/CMakeLists.txt
@@ -56,7 +56,8 @@ endforeach ()
add_custom_target(H5Ex_G_Visit_files ALL COMMENT "Copying files needed by H5Ex_G_Visit tests" DEPENDS ${H5Ex_G_Visit_files_list})
macro (ADD_H5_TEST resultfile resultcode)
- set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$<TARGET_PROPERTY:${HDF5_JAVA_JNI_LIB_TARGET},OUTPUT_NAME$<$<CONFIG:Debug>:_DEBUG>>;")
+ get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY $<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
+ set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name};")
add_test (
NAME JAVA_groups-${resultfile}
COMMAND "${CMAKE_COMMAND}"
diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt
index 8c94a09..1801749 100644
--- a/java/examples/intro/CMakeLists.txt
+++ b/java/examples/intro/CMakeLists.txt
@@ -58,7 +58,8 @@ foreach (example ${HDF_JAVA_OBJECT_EXAMPLES})
endforeach ()
MACRO (ADD_H5_TEST resultfile resultcode)
- set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$<TARGET_PROPERTY:${HDF5_JAVA_JNI_LIB_TARGET},OUTPUT_NAME$<$<CONFIG:Debug>:_DEBUG>>;")
+ get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY $<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
+ set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name};")
add_test (
NAME JAVA_intro-${resultfile}
COMMAND "${CMAKE_COMMAND}"
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index b76f572..8464d25 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -87,7 +87,8 @@ else ()
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
endif ()
-set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$<TARGET_PROPERTY:${HDF5_JAVA_JNI_LIB_TARGET},OUTPUT_NAME$<$<CONFIG:Debug>:_DEBUG>>;")
+get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY $<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
+set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name};")
foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 700c8c3..c1ebba9 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -47,6 +47,15 @@ New Features
Configuration:
-------------
+ - Windows PDB files are installed incorrectly
+
+ For static builds, the PDB files for windows should be installed next
+ to the static libraries in the lib folder. Also the debug versions of
+ libraries and PDB files are now correctly built using the default
+ CMAKE_DEBUG_POSTFIX setting.
+
+ (ADB - 2019/07/09, HDFFV-10581)
+
- Add option to build only shared libs
A request was made to prevent building static libraries and only build
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index aff732d..851ac0a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1153,7 +1153,7 @@ if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
endif ()
if (NOT ONLY_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
+ INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} libraries)
endif ()
install (
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index e9dfcaa..75ed627 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -85,7 +85,7 @@ if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries)
endif ()
if (NOT ONLY_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries)
+ INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} toolslibraries)
endif ()
install (