Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sébastien Villemot
dynare
Commits
80cf5ba3
Verified
Commit
80cf5ba3
authored
7 months ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
Build system: prefer shorter meson options --buildtype and --prefer-static
parent
9a323074
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+6
-6
6 additions, 6 deletions
README.md
macOS/build.sh
+1
-1
1 addition, 1 deletion
macOS/build.sh
windows/build.sh
+1
-1
1 addition, 1 deletion
windows/build.sh
with
8 additions
and
8 deletions
README.md
+
6
−
6
View file @
80cf5ba3
...
...
@@ -104,13 +104,13 @@ If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5.
If you want to compile for MATLAB, please run the following (after adapting the path to MATLAB):
```
sh
meson setup
-Dmatlab_path
=
/usr/local/MATLAB/R2023b
-
D
buildtype
=
debugoptimized build-matlab
meson setup
-Dmatlab_path
=
/usr/local/MATLAB/R2023b
-
-
buildtype
=
debugoptimized build-matlab
```
The build directory will thus be
`build-matlab`
.
Or for Octave:
```
sh
meson setup
-Dbuild_for
=
octave
-
D
buildtype
=
debugoptimized build-octave
meson setup
-Dbuild_for
=
octave
-
-
buildtype
=
debugoptimized build-octave
```
The build directory will thus be
`build-octave`
.
...
...
@@ -273,7 +273,7 @@ Now use the following commands if using MATLAB (adapt them for Octave, see above
cd
/home/
$USER
/dynare
git clone
--recurse-submodules
https://git.dynare.org/dynare/dynare.git unstable
cd
unstable
meson setup
-Dmatlab_path
=
/usr/local/MATLAB/R2023b
-Dfortran_args
=
"[ '-B', '/home/
$USER
/dynare/slicot']"
-
D
buildtype
=
debugoptimized build-matlab
meson setup
-Dmatlab_path
=
/usr/local/MATLAB/R2023b
-Dfortran_args
=
"[ '-B', '/home/
$USER
/dynare/slicot']"
-
-
buildtype
=
debugoptimized build-matlab
meson compile
-C
build-matlab
```
...
...
@@ -318,7 +318,7 @@ cd dynare
```
-
Configure Dynare from the source directory (adjust
`matlab_path`
if you use a different version than R2024a):
```
sh
meson setup
-Dmatlab_path
=
/usr/local/MATLAB/R2024a
-
D
buildtype
=
debugoptimized build-matlab
meson setup
-Dmatlab_path
=
/usr/local/MATLAB/R2024a
-
-
buildtype
=
debugoptimized build-matlab
```
-
Compile:
```
sh
...
...
@@ -362,7 +362,7 @@ cd dynare
```
-
Configure Dynare from the source directory:
```
sh
meson setup
-Dmatlab_path
=
<…>
-
D
buildtype
=
debugoptimized
-
D
prefer
_
static
=
true
-Dfortran_args
=
"['-B','/usr/local/lib']"
build-matlab
meson setup
-Dmatlab_path
=
<…>
-
-
buildtype
=
debugoptimized
-
-
prefer
-
static
-Dfortran_args
=
"['-B','/usr/local/lib']"
build-matlab
```
where the path of MATLAB is specified. Note that you should use
the MSYS2 notation and not put spaces in the MATLAB path, so you probably want
...
...
@@ -520,7 +520,7 @@ If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5.
```
sh
export
BUILDDIR
=
build-matlab
export
MATLABPATH
=
/Applications/MATLAB_R2023b.app
arch
-
$ARCH
meson setup
--native-file
macOS/homebrew-native-
$ARCH
.ini
-Dmatlab_path
=
$MATLABPATH
-
D
buildtype
=
debugoptimized
-Dfortran_args
=
"['-B','
$DYNAREDIR
/slicot/lib']"
$BUILDDIR
arch
-
$ARCH
meson setup
--native-file
macOS/homebrew-native-
$ARCH
.ini
-Dmatlab_path
=
$MATLABPATH
-
-
buildtype
=
debugoptimized
-Dfortran_args
=
"['-B','
$DYNAREDIR
/slicot/lib']"
$BUILDDIR
```
where you need to adapt the path to MATLAB.
Similarly, if you want to compile for Octave, replace the
`-Dmatlab_path`
option by
`-Dbuild_for=octave`
, and change the build directory to
`build-octave`
.
...
...
This diff is collapsed.
Click to expand it.
macOS/build.sh
+
1
−
1
View file @
80cf5ba3
...
...
@@ -70,7 +70,7 @@ ln -s "$BREWDIR"/opt/gcc/lib/gcc/"$GCC_VERSION"/libquadmath.a "$QUADMATH_DIR"
cd
"
$ROOTDIR
"
# NB: the addition of -Wl,-ld_classic is a workaround for https://github.com/mesonbuild/meson/issues/12282 (see also the native file)
common_meson_opts
=(
-Dbuild_for
=
matlab
-
D
buildtype
=
release
-
D
prefer
_
static
=
true
-Dfortran_args
=
"[ '-B', '
$LIB64
/Slicot/' ]"
\
common_meson_opts
=(
-Dbuild_for
=
matlab
-
-
buildtype
=
release
-
-
prefer
-
static
-Dfortran_args
=
"[ '-B', '
$LIB64
/Slicot/' ]"
\
-Dc_link_args
=
"[ '-Wl,-ld_classic', '-L
$QUADMATH_DIR
' ]"
-Dcpp_link_args
=
"[ '-Wl,-ld_classic', '-L
$QUADMATH_DIR
' ]"
-Dfortran_link_args
=
"[ '-Wl,-ld_classic', '-L
$QUADMATH_DIR
' ]"
\
--native-file
macOS/homebrew-native-
$PKG_ARCH
.ini
)
...
...
This diff is collapsed.
Click to expand it.
windows/build.sh
+
1
−
1
View file @
80cf5ba3
...
...
@@ -53,7 +53,7 @@ ln -s "$ROOT_DIRECTORY"/deps/mkoctfile64 /tmp/windeps/
# Go to source root directory
cd
..
common_meson_opts
=(
-
D
buildtype
=
release
--cross-file
windows/mingw-cross.ini
)
common_meson_opts
=(
-
-
buildtype
=
release
--cross-file
windows/mingw-cross.ini
)
# Create Windows 64-bit DLL binaries for MATLAB ≥ R2018b
meson setup
--cross-file
windows/mingw-cross-matlab.ini
-Dmatlab_path
=
/tmp/windeps/matlab64/R2018b
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment