From 45ddbafc5dd29aa2fafe22d6e1a86fa1e8803625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Mon, 27 Jan 2025 11:13:59 +0100 Subject: [PATCH] =?UTF-8?q?Build=20system:=20workaround=20for=20MATLAB=20O?= =?UTF-8?q?nline=20package=20no=20longer=20needed=20for=20Meson=20?= =?UTF-8?q?=E2=A9=BE=201.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 0afbf1b3b0..6a3458b934 100644 --- a/meson.build +++ b/meson.build @@ -173,12 +173,12 @@ if get_option('build_for') == 'matlab' umfpack_dep = declare_dependency(link_args : '-lmwumfpack', dependencies : blas_dep) ut_dep = declare_dependency(link_args : '-lut') - # Workaround for Meson bug https://github.com/mesonbuild/meson/issues/12757 - # Use the C compiler as a fallback for detecting SLICOT under Linux with - # prefer_static=true (but still try the Fortran compiler to honour the -B - # option in fortran_args, as documented). Needed for building the MATLAB - # Online package. - if get_option('prefer_static') and host_machine.system() == 'linux' + if meson.version().version_compare('<1.7.0') and get_option('prefer_static') and host_machine.system() == 'linux' + # Workaround for Meson bug https://github.com/mesonbuild/meson/issues/12757 (fixed in 1.7.0) + # Use the C compiler as a fallback for detecting SLICOT under Linux with + # prefer_static=true (but still try the Fortran compiler to honour the -B + # option in fortran_args, as documented). Needed for building the MATLAB + # Online package. slicot_dep_tmp = fortran_compiler.find_library('slicot64_pic', required : false) if not slicot_dep_tmp.found() slicot_dep_tmp = c_compiler.find_library('slicot64_pic') -- GitLab