summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-05-05 20:57:40 (GMT)
committerGitHub <noreply@github.com>2023-05-05 20:57:40 (GMT)
commit4b228ec6af3c53956fba7822c0ae808d3d3e2cb3 (patch)
tree134559dc3c077697845f0158e9da73162210ff2f
parentcc4d63b026dd0c392adc28e90a14eec47cb10bdd (diff)
downloadhdf5-4b228ec6af3c53956fba7822c0ae808d3d3e2cb3.zip
hdf5-4b228ec6af3c53956fba7822c0ae808d3d3e2cb3.tar.gz
hdf5-4b228ec6af3c53956fba7822c0ae808d3d3e2cb3.tar.bz2
Fix CMake generator expression syntax (#2909)
-rw-r--r--c++/src/CMakeLists.txt4
-rw-r--r--c++/test/CMakeLists.txt2
-rw-r--r--config/cmake/HDFMacros.cmake6
-rw-r--r--fortran/examples/CMakeLists.txt4
-rw-r--r--fortran/src/CMakeLists.txt4
-rw-r--r--fortran/test/CMakeLists.txt24
-rw-r--r--release_docs/RELEASE.txt13
-rw-r--r--src/CMakeLists.txt22
-rw-r--r--test/API/CMakeLists.txt4
-rw-r--r--test/CMakeLists.txt42
-rw-r--r--testpar/API/CMakeLists.txt4
-rw-r--r--testpar/CMakeLists.txt8
12 files changed, 75 insertions, 62 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index ab1baed..1ba90ce 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -85,7 +85,7 @@ if (BUILD_STATIC_LIBS)
)
target_compile_options(${HDF5_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
target_compile_definitions(${HDF5_CPP_LIB_TARGET}
- PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_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})
@@ -104,7 +104,7 @@ if (BUILD_SHARED_LIBS)
target_compile_options(${HDF5_CPP_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
target_compile_definitions(${HDF5_CPP_LIBSH_TARGET}
PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
- PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_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}
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 55aade2..308bc3b 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -41,7 +41,7 @@ add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} ${HDF5_CPP_TEST_SOURCE_DIR}/h5c
target_include_directories (cpp_testhdf5 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(cpp_testhdf5 PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
target_compile_definitions(cpp_testhdf5
- PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_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
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (cpp_testhdf5 STATIC)
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
index e0e1220..be9ceaf 100644
--- a/config/cmake/HDFMacros.cmake
+++ b/config/cmake/HDFMacros.cmake
@@ -77,7 +77,7 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
if (${target_type} MATCHES "SHARED")
set (targetfilename $<TARGET_PDB_FILE:${libtarget}>)
else ()
- get_property (target_name TARGET ${libtarget} PROPERTY $<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:Developer>>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
+ get_property (target_name TARGET ${libtarget} PROPERTY "$<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:Developer>>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>")
set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb)
endif ()
install (
@@ -213,8 +213,8 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (TARGET_C_PROPERTIES wintarget libtype)
target_compile_options(${wintarget} PRIVATE
- $<$<C_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>
- $<$<CXX_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>
+ "$<$<C_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>"
+ "$<$<CXX_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>"
)
if(MSVC)
set_property(TARGET ${wintarget} APPEND PROPERTY LINK_FLAGS "${WIN_LINK_FLAGS}")
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index e7edf40..3a16c23 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -137,7 +137,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
PRIVATE
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
- $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
+ "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>"
)
set_target_properties (f90_ex_ph5example PROPERTIES
LINKER_LANGUAGE Fortran
@@ -158,7 +158,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
PRIVATE
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
- $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
+ "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>"
)
set_target_properties (f90_ex_ph5example PROPERTIES
LINKER_LANGUAGE Fortran
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 5cfdead..fbe9468 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -339,7 +339,7 @@ if (BUILD_STATIC_LIBS)
PUBLIC ${HDF5_F90_C_LIB_TARGET}
PRIVATE
${LINK_Fortran_LIBS}
- $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
+ "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>"
)
# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
@@ -372,7 +372,7 @@ if (BUILD_SHARED_LIBS)
)
target_link_libraries (${HDF5_F90_LIBSH_TARGET}
PUBLIC ${HDF5_F90_C_LIBSH_TARGET}
- PRIVATE ${LINK_Fortran_LIBS} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
+ PRIVATE ${LINK_Fortran_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>"
)
# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index e885427..67c8b75 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -224,7 +224,7 @@ if(MSVC)
endif()
if (NOT BUILD_SHARED_LIBS)
target_include_directories (testhdf5_fortran PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
- target_link_libraries (testhdf5_fortran PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (testhdf5_fortran PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (testhdf5_fortran PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -233,7 +233,7 @@ if (NOT BUILD_SHARED_LIBS)
add_dependencies (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET})
else ()
target_include_directories (testhdf5_fortran PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
- target_link_libraries (testhdf5_fortran PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (testhdf5_fortran PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (testhdf5_fortran PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -263,7 +263,7 @@ if(MSVC)
endif()
if (NOT BUILD_SHARED_LIBS)
target_include_directories (testhdf5_fortran_1_8 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
- target_link_libraries (testhdf5_fortran_1_8 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (testhdf5_fortran_1_8 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (testhdf5_fortran_1_8 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -272,7 +272,7 @@ if (NOT BUILD_SHARED_LIBS)
add_dependencies (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET})
else ()
target_include_directories (testhdf5_fortran_1_8 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
- target_link_libraries (testhdf5_fortran_1_8 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (testhdf5_fortran_1_8 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (testhdf5_fortran_1_8 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -304,7 +304,7 @@ if(MSVC)
endif()
if (NOT BUILD_SHARED_LIBS)
target_include_directories (fortranlib_test_F03 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
- target_link_libraries (fortranlib_test_F03 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (fortranlib_test_F03 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (fortranlib_test_F03 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -313,7 +313,7 @@ if (NOT BUILD_SHARED_LIBS)
add_dependencies (fortranlib_test_F03 ${HDF5_F90_TEST_LIB_TARGET})
else ()
target_include_directories (fortranlib_test_F03 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
- target_link_libraries (fortranlib_test_F03 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (fortranlib_test_F03 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (fortranlib_test_F03 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -336,7 +336,7 @@ if(MSVC)
endif()
if (NOT BUILD_SHARED_LIBS)
target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- target_link_libraries (fflush1 PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (fflush1 PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (fflush1 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -345,7 +345,7 @@ if (NOT BUILD_SHARED_LIBS)
add_dependencies (fflush1 ${HDF5_F90_TEST_LIB_TARGET})
else ()
target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- target_link_libraries (fflush1 PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (fflush1 PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (fflush1 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -368,7 +368,7 @@ if(MSVC)
endif()
if (NOT BUILD_SHARED_LIBS)
target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- target_link_libraries (fflush2 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (fflush2 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (fflush2 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -377,7 +377,7 @@ if (NOT BUILD_SHARED_LIBS)
add_dependencies (fflush2 ${HDF5_F90_TEST_LIB_TARGET})
else ()
target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- target_link_libraries (fflush2 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (fflush2 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (fflush2 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -400,7 +400,7 @@ if(MSVC)
endif()
if (NOT BUILD_SHARED_LIBS)
target_include_directories (vol_connector PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- target_link_libraries (vol_connector PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (vol_connector PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (vol_connector PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -409,7 +409,7 @@ if (NOT BUILD_SHARED_LIBS)
add_dependencies (vol_connector ${HDF5_F90_TEST_LIB_TARGET})
else ()
target_include_directories (vol_connector PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- target_link_libraries (vol_connector PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
+ target_link_libraries (vol_connector PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<PLATFORM_ID:Windows>:ws2_32.lib>")
set_target_properties (vol_connector PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 4b13d09..8d3111e 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -414,6 +414,19 @@ Bug Fixes since HDF5-1.14.0 release
Configuration
-------------
+ - Fixed syntax of generator expressions used by CMake
+
+ Add quotes around the generator expression should allow CMake to
+ correctly parse the expression. Generator expressions are typically
+ parsed after command arguments. If a generator expression contains
+ spaces, new lines, semicolons or other characters that may be
+ interpreted as command argument separators, the whole expression
+ should be surrounded by quotes when passed to a command. Failure to
+ do so may result in the expression being split and it may no longer
+ be recognized as a generator expression.
+
+ Fixes GitHub issue #2906
+
- Fixed improper include of Subfiling VFD build directory
With the release of the Subfiling Virtual File Driver feature, compiler
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e002e4f..4edcc98 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1238,18 +1238,18 @@ if (BUILD_STATIC_LIBS)
${HDF_EXTRA_C_FLAGS}
${HDF_EXTRA_FLAGS}
PRIVATE
- $<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
- $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:${HDF5_DEBUG_APIS}>
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API>" # Enable tracing of the API
+ "$<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:${HDF5_DEBUG_APIS}>"
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_LIB_TARGET}
PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS}
- PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}> "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
+ PUBLIC "$<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}>" "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
)
if (NOT WIN32)
target_link_libraries (${HDF5_LIB_TARGET}
- PRIVATE $<$<OR:$<BOOL:${HDF5_ENABLE_THREADSAFE}>,$<BOOL:${HDF5_ENABLE_SUBFILING_VFD}>>:Threads::Threads>
+ PRIVATE "$<$<OR:$<BOOL:${HDF5_ENABLE_THREADSAFE}>,$<BOOL:${HDF5_ENABLE_SUBFILING_VFD}>>:Threads::Threads>"
)
endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
@@ -1280,16 +1280,16 @@ if (BUILD_SHARED_LIBS)
${HDF_EXTRA_C_FLAGS}
${HDF_EXTRA_FLAGS}
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}>:${HDF5_DEBUG_APIS}>
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE>"
+ "$<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API>" # Enable tracing of the API
+ "$<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:${HDF5_DEBUG_APIS}>"
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_LIBSH_TARGET}
PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS}
- $<$<OR:$<BOOL:${HDF5_ENABLE_THREADSAFE}>,$<BOOL:${HDF5_ENABLE_SUBFILING_VFD}>>:Threads::Threads>
- PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}> "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
+ "$<$<OR:$<BOOL:${HDF5_ENABLE_THREADSAFE}>,$<BOOL:${HDF5_ENABLE_SUBFILING_VFD}>>:Threads::Threads>"
+ PUBLIC "$<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}>" "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB")
diff --git a/test/API/CMakeLists.txt b/test/API/CMakeLists.txt
index dd2bca2..606aa9c 100644
--- a/test/API/CMakeLists.txt
+++ b/test/API/CMakeLists.txt
@@ -134,7 +134,7 @@ target_compile_options (
target_compile_definitions (
h5_api_test
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5_api_test STATIC)
@@ -214,7 +214,7 @@ foreach (api_test_extra ${HDF5_API_TESTS_EXTRA})
target_compile_definitions (
h5_api_test_${api_test_extra}
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5_api_test_${api_test_extra} STATIC)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index fe52cd3..210ff22 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -37,12 +37,12 @@ if (BUILD_STATIC_LIBS)
target_compile_definitions(${HDF5_TEST_LIB_TARGET}
PRIVATE
"H5_TEST_EXPRESS_LEVEL_DEFAULT=${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_TEST_LIB_TARGET}
PUBLIC ${LINK_LIBS} ${HDF5_LIB_TARGET}
- PRIVATE $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
+ PRIVATE "$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>"
)
if (MINGW)
target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "wsock32.lib")
@@ -63,12 +63,12 @@ if (BUILD_SHARED_LIBS)
"H5_BUILT_AS_DYNAMIC_LIB"
PRIVATE
"H5_TEST_EXPRESS_LEVEL_DEFAULT=${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET}
PUBLIC ${LINK_LIBS} ${HDF5_LIBSH_TARGET}
- PRIVATE $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
+ PRIVATE "$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>"
)
if (MINGW)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "wsock32.lib")
@@ -401,7 +401,7 @@ macro (ADD_H5_EXE file)
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${file}
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
@@ -445,7 +445,7 @@ add_executable (chunk_info ${HDF5_TEST_SOURCE_DIR}/chunk_info.c)
target_compile_options(chunk_info PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(chunk_info
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (chunk_info PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -469,7 +469,7 @@ add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
target_compile_options(direct_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(direct_chunk
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (direct_chunk PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -494,7 +494,7 @@ add_executable (testhdf5 ${testhdf5_SOURCES})
target_compile_options(testhdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(testhdf5
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (testhdf5 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -518,7 +518,7 @@ add_executable (cache_image ${cache_image_SOURCES})
target_compile_options(cache_image PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(cache_image
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (cache_image PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -542,7 +542,7 @@ add_executable (ttsafe ${ttsafe_SOURCES})
target_compile_options(ttsafe PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(ttsafe
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (ttsafe PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -550,12 +550,12 @@ if (NOT BUILD_SHARED_LIBS)
target_link_libraries (ttsafe PRIVATE ${HDF5_TEST_LIB_TARGET})
if (NOT WIN32)
target_link_libraries (ttsafe
- PRIVATE $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
+ PRIVATE "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>"
)
endif ()
else ()
TARGET_C_PROPERTIES (ttsafe SHARED)
- target_link_libraries (ttsafe PRIVATE ${HDF5_TEST_LIBSH_TARGET} $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>)
+ target_link_libraries (ttsafe PRIVATE ${HDF5_TEST_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>")
endif ()
set_target_properties (ttsafe PROPERTIES FOLDER test)
@@ -572,7 +572,7 @@ add_executable (thread_id ${HDF5_TEST_SOURCE_DIR}/thread_id.c)
target_compile_options(thread_id PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(thread_id
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (thread_id PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -580,12 +580,12 @@ if (NOT BUILD_SHARED_LIBS)
target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIB_TARGET})
if (NOT WIN32)
target_link_libraries (thread_id
- PRIVATE $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
+ PRIVATE "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>"
)
endif ()
else ()
TARGET_C_PROPERTIES (thread_id SHARED)
- target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIBSH_TARGET} $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>)
+ target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>")
endif ()
set_target_properties (thread_id PROPERTIES FOLDER test)
@@ -682,7 +682,7 @@ macro (ADD_H5_VDS_EXE file)
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${file}
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
@@ -712,7 +712,7 @@ add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
target_compile_options(accum_swmr_reader PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(accum_swmr_reader
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (accum_swmr_reader PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -786,7 +786,7 @@ add_executable (use_append_chunk ${use_append_chunk_SOURCES})
target_compile_options(use_append_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(use_append_chunk
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -811,7 +811,7 @@ if (HDF5_BUILD_UTILS) # requires mirror server
target_compile_options(use_append_chunk_mirror PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(use_append_chunk_mirror
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (use_append_chunk_mirror PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -836,7 +836,7 @@ add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
target_compile_options(use_append_mchunks PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(use_append_mchunks
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -860,7 +860,7 @@ add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES})
target_compile_options(use_disable_mdc_flushes PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(use_disable_mdc_flushes
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (use_disable_mdc_flushes PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
diff --git a/testpar/API/CMakeLists.txt b/testpar/API/CMakeLists.txt
index e907078..f893f0c 100644
--- a/testpar/API/CMakeLists.txt
+++ b/testpar/API/CMakeLists.txt
@@ -94,7 +94,7 @@ target_compile_options (
target_compile_definitions (
h5_api_test_parallel
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5_api_test_parallel STATIC)
@@ -173,7 +173,7 @@ foreach (api_test_extra ${HDF5_API_PAR_TESTS_EXTRA})
target_compile_definitions (
h5_api_test_parallel_${api_test_extra}
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5_api_test_parallel_${api_test_extra} STATIC)
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 6bb5fa6..7894cff 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -26,7 +26,7 @@ add_executable (testphdf5 ${testphdf5_SOURCES})
target_compile_options(testphdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(testphdf5
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (testphdf5
PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -56,7 +56,7 @@ macro (ADD_H5P_EXE file)
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${file}
PRIVATE
- $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_include_directories (${file}
PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -65,13 +65,13 @@ macro (ADD_H5P_EXE file)
TARGET_C_PROPERTIES (${file} STATIC)
target_link_libraries (${file}
PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
- $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
+ "$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>"
)
else ()
TARGET_C_PROPERTIES (${file} SHARED)
target_link_libraries (${file}
PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
- $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
+ "$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>"
)
endif ()
set_target_properties (${file} PROPERTIES FOLDER test/par)