Skip to content

Commit ed7981b

Browse files
committed
meson option to control linking of hdf5 deps
1 parent 33b9719 commit ed7981b

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/release-management.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- os_bin: linux64
2626
flags: '-Dwith-mpi=disabled --cross-file=/hostfiles/hostfile_linux'
2727
- os_bin: linux64-mpi
28-
flags: '-Dcustom-mpi=true --cross-file=/hostfiles/hostfile_linux_mpi'
28+
flags: '-Dcustom-mpi=true -Dstatic-cgns-deps=true --cross-file=/hostfiles/hostfile_linux_mpi'
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Cache Object Files

externals/cgns/hdf5/meson.build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ hdf5_conf_data.set('version', '1.12.1')
2424

2525
ext_deps = []
2626

27-
28-
opt_zlib = dependency('zlib', required: false)
29-
opt_szip = dependency('szip', required: false)
27+
opt_zlib = dependency('zlib', required: false, static: get_option('static-cgns-deps'))
28+
opt_szip = dependency('szip', required: false, static: get_option('static-cgns-deps'))
3029

3130
if opt_zlib.found() and cc.has_header('zlib.h')
3231
if cc.has_function('inflate', dependencies: opt_zlib, prefix: '#include <zlib.h>')

meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,3 +304,7 @@ if get_option('enable-librom')
304304
'''.format(get_option('librom_root')))
305305

306306
endif
307+
308+
if get_option('enable-pywrapper') and get_option('enable-cgns') and not get_option('static-cgns-deps')
309+
message(''' WARNING: If compilation fails with a message regarding "static linkage of dynamic object", reconfigure with option -Dstatic-cgns-deps=true.''')
310+
endif

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ option('codi-tape', type : 'combo', choices : ['JacobianLinear', 'JacobianIndex'
2323
option('opdi-shared-read-opt', type : 'boolean', value : true, description : 'OpDiLib shared reading optimization')
2424
option('librom_root', type : 'string', value : '', description: 'libROM base directory')
2525
option('enable-librom', type : 'boolean', value : false, description: 'enable LLNL libROM support')
26+
option('static-cgns-deps', type : 'boolean', value : false, description: 'prefer static or dynamic (default) libraries for CGNS dependencies')

0 commit comments

Comments
 (0)