diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-03-14 01:37:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 01:37:36 (GMT) |
commit | 9a5bde57bd216a08d6a66c1702fd87a0b559fada (patch) | |
tree | b88114eae044446cd8a7b5d6a0bcf2383e0fa2e4 /hl/tools | |
parent | 1e8ce8767a991f269eb5101fbee700db03b09398 (diff) | |
download | hdf5-9a5bde57bd216a08d6a66c1702fd87a0b559fada.zip hdf5-9a5bde57bd216a08d6a66c1702fd87a0b559fada.tar.gz hdf5-9a5bde57bd216a08d6a66c1702fd87a0b559fada.tar.bz2 |
Make sure that ONLY_SHARED_LIBS option is correctly set (#2546)
Diffstat (limited to 'hl/tools')
-rw-r--r-- | hl/tools/gif2h5/CMakeLists.txt | 10 | ||||
-rw-r--r-- | hl/tools/h5watch/CMakeLists.txt | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt index 372fb60..a797c80 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_DIR};${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_DIR};${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_DIR};${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 1ab473d..6c667c7 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_DIR};${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_DIR};${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_DIR};${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 () |