summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-04-04 16:36:23 (GMT)
committerGitHub <noreply@github.com>2023-04-04 16:36:23 (GMT)
commitf13f8705b18dbd21ea08192d7167a24a4f5309fe (patch)
treead510e8ff9fbf858822d921b65d3f8120fe9f226 /hl/tools
parentec0d4d64867923577c7680c94bf4d51558664693 (diff)
downloadhdf5-f13f8705b18dbd21ea08192d7167a24a4f5309fe.zip
hdf5-f13f8705b18dbd21ea08192d7167a24a4f5309fe.tar.gz
hdf5-f13f8705b18dbd21ea08192d7167a24a4f5309fe.tar.bz2
Make sure that ONLY_SHARED_LIBS option is correctly set (#2545)
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt10
-rw-r--r--hl/tools/h5watch/CMakeLists.txt8
2 files changed, 9 insertions, 9 deletions
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index 3a9c708..f3b1fef 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -14,7 +14,7 @@ set (GIF2H5_SOURCES
)
#-- Add gif2hdf5 program
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_executable (gif2h5 ${GIF2H5_SOURCES})
target_compile_options(gif2h5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (gif2h5 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -44,7 +44,7 @@ endif ()
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
clang_format (HDF5_HL_TOOLS_GIF2H5_FORMAT gif2h5)
else ()
clang_format (HDF5_HL_TOOLS_GIF2H5_FORMAT gif2h5-shared)
@@ -56,7 +56,7 @@ set (hdf2gif_SOURCES
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdf2gif.c
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c
)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_executable (h52gif ${hdf2gif_SOURCES})
target_compile_options(h52gif PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (h52gif PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -86,7 +86,7 @@ endif ()
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
clang_format (HDF5_HL_TOOLS_H52GIF_FORMAT h52gif)
else ()
clang_format (HDF5_HL_TOOLS_H52GIF_FORMAT h52gif-shared)
@@ -99,7 +99,7 @@ if (BUILD_TESTING AND HDF5_TEST_SERIAL)
# used in the CMake Build system as we rely on the test files that are
# shipped with HDF5 source archives
# --------------------------------------------------------------------
- if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
+ if (HDF5_BUILD_GENERATORS AND BUILD_STATIC_LIBS)
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c)
target_include_directories (hl_h52gifgentest PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (hl_h52gifgentest STATIC)
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index fc4c3a0..1eb3618 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -9,7 +9,7 @@ set (H5WATCH_SOURCES
)
#-- Add h5watch program
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_executable (h5watch ${H5WATCH_SOURCES})
target_compile_options(h5watch PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (h5watch PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -32,7 +32,7 @@ endif ()
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
clang_format (HDF5_HL_TOOLS_H5WATCH_FORMAT h5watch)
else ()
clang_format (HDF5_HL_TOOLS_H5WATCH_FORMAT h5watch-shared)
@@ -47,7 +47,7 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
add_executable (extend_dset ${extend_dset_SOURCES})
target_compile_options(extend_dset PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (extend_dset PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
TARGET_C_PROPERTIES (extend_dset STATIC)
target_link_libraries (extend_dset PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
else ()
@@ -66,7 +66,7 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c)
target_compile_options(h5watchgentest PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (h5watchgentest PRIVATE "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
TARGET_C_PROPERTIES (h5watchgentest STATIC)
target_link_libraries (h5watchgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
else ()