File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515endif
1616
1717cc = meson .get_compiler(' c' )
18+ # Check if can run tests
19+ cc_can_run = not meson .is_cross_build() or meson .has_exe_wrapper()
20+
1821
1922hdf5_conf_data = configuration_data ()
2023hdf5_conf_data.set(' version' , ' 1.12.1' )
@@ -393,7 +396,7 @@ int main ()
393396'''
394397
395398result = cc.compiles(code_dev_t, name : ' check dev_t' )
396- if result
399+ if result and cc_can_run
397400 result_dev = cc.run(code_dev_t, name : ' check dev_t scalar' )
398401 hdf5_conf_data.set(' H5_DEV_T_IS_SCALAR' , result_dev.returncode())
399402else
@@ -573,7 +576,7 @@ int main ()
573576}
574577'''
575578 result = cc.compiles(code_ioeo, name : ' check ioeo' )
576- if result
579+ if result and cc_can_run
577580 result_ioeo = cc.run(code_ioeo, name : ' check ioeo works' )
578581 hdf5_conf_data.set(' H5_HAVE_IOEO' , result_ioeo.returncode())
579582 else
You can’t perform that action at this time.
0 commit comments