From 4dbedd5ec295d30fa55d0318d74e03352c102c00 Mon Sep 17 00:00:00 2001 From: jcschaff Date: Mon, 3 Jun 2024 08:04:52 -0400 Subject: [PATCH] try dynamic binding for hdf5 for python/linux --- .github/workflows/pip.yml | 4 +--- CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index f3d72d49..a78f9379 100644 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -113,9 +113,7 @@ jobs: - name: Build and install windows-latest shell: msys2 {0} run: | - platform=windows - PATH="/c/Program Files/LLVM/bin:$PATH" - pip install --verbose . + pip install --verbose -Ccmake.define.CMAKE_C_COMPILER="clang.exe" -Ccmake.define.CMAKE_CXX_COMPILER="clang++.exe" . if: matrix.platform == 'windows-latest' - name: Build and install ubuntu-latest diff --git a/CMakeLists.txt b/CMakeLists.txt index 00d02ecb..2e8b5b68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,6 +179,10 @@ if(WINDOWS OR WIN32 OR WIN64) set(HDF5_USE_STATIC_LIBRARIES OFF) add_definitions(-DZIP_STATIC) endif () +if (LINUX AND OPTION_TARGET_PYTHON_BINDING) + set(HDF5_USE_STATIC_LIBRARIES OFF) +endif() + #CMakeList.txt that comes with hdf5 switches library name if compiled with debug find_package(HDF5 COMPONENTS HL CXX C) set(HDF_VERSION ${HDF5_VERSION})