diff --git a/.github/julia/build_tarballs.jl b/.github/julia/build_tarballs.jl index 6d44fdbc..f6852c9f 100644 --- a/.github/julia/build_tarballs.jl +++ b/.github/julia/build_tarballs.jl @@ -20,6 +20,10 @@ cd ${WORKSPACE}/srcdir/CUTEst meson setup builddir --cross-file=${MESON_TARGET_TOOLCHAIN%.*}_gcc.meson --prefix=$prefix -Dquadruple=true meson compile -C builddir meson install -C builddir + +meson setup builddir_shared --cross-file=${MESON_TARGET_TOOLCHAIN%.*}_gcc.meson --prefix=$prefix -Dquadruple=true -Ddefault_library=shared +meson compile -C builddir_shared +meson install -C builddir_shared """ # These are the platforms we will build for by default, unless further @@ -29,9 +33,12 @@ platforms = expand_gfortran_versions(platforms) # The products that we will ensure are always built products = [ - FileProduct("lib/libcutest_single.a", :libcutest_single) - FileProduct("lib/libcutest_double.a", :libcutest_double) - FileProduct("lib/libcutest_quadruple.a", :libcutest_quadruple) + FileProduct("lib/libcutest_single.a", :libcutest_single_a), + FileProduct("lib/libcutest_double.a", :libcutest_double_a), + FileProduct("lib/libcutest_quadruple.a", :libcutest_quadruple_a), + LibraryProduct("libcutest_single", :libcutest_single), + LibraryProduct("libcutest_double", :libcutest_double), + LibraryProduct("libcutest_quadruple", :libcutest_quadruple), ] # Dependencies that must be installed before this package can be built diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 32a21e32..37ef9b76 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -106,7 +106,10 @@ jobs: python-version: '3.11' - name: Install Meson and Ninja - run: pip install meson ninja + shell: bash + run: | + pip install meson==1.4.1 + pip install ninja - name: Set the environment variables CUTEST shell: bash diff --git a/meson.build b/meson.build index 256a9009..c94b4582 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'CUTEst', 'fortran', 'c', version: '2.2.0', - meson_version: '>= 0.61.0', + meson_version: '>= 0.62.0', default_options: [ 'buildtype=release', 'libdir=lib', @@ -36,6 +36,9 @@ cutest_headers = [] libcutest_include = [] libcutest_include += include_directories('include') +# Dependency +libdl = fc.find_library('dl', required : false) + # Sources subdir('include') # subdir('src/algencan') # needs algencan_ @@ -139,6 +142,7 @@ gen_single = generator(fc_compiler, pp_sources_single = [gen_single.process(libcutest_src)] libcutest_single = library(libcutest_single_name, + dependencies : libdl, sources : pp_sources_single + libcutest_c_src, include_directories : libcutest_include, install : true) @@ -158,6 +162,7 @@ gen_double = generator(fc_compiler, pp_sources_double = [gen_double.process(libcutest_src)] libcutest_double = library(libcutest_double_name, + dependencies : libdl, sources : pp_sources_double + libcutest_c_src, include_directories : libcutest_include, install : true) @@ -178,6 +183,7 @@ if build_quadruple pp_sources_quadruple = [gen_quadruple.process(libcutest_src)] libcutest_quadruple = library(libcutest_quadruple_name, + dependencies : libdl, sources : pp_sources_quadruple + libcutest_c_src, include_directories : libcutest_include, install : true)