Commit Graph

33 Commits (90a408e3c3bcce45738e27cb9189a6b18ce6b661)

Author SHA1 Message Date
Sébastien Villemot 90a408e3c3
Build system: enable the dangling else warning (-Wdangling-else)
Adapt the code accordingly.
2023-04-11 17:31:18 +02:00
Sébastien Villemot 403db2cc64
Bytecode MEX: under Octave, use system-wide umfpack.h instead of our own version 2023-03-31 16:18:27 +02:00
Sébastien Villemot 888a87312d
Enable -Wunused-parameter for C++ MEX
Except for libdynare++, since Dynare++ is not ready (and is probably not worth
fixing by adding [[maybe_unused]] tags).
2022-07-05 12:12:53 +02:00
Sébastien Villemot dfcfdda318
Enable more compiler warnings for C++ 2022-06-07 18:01:58 +02:00
Sébastien Villemot cc8b2fd920
Bump to C++20 standard (with GNU extensions)
In practice, for the time being, we limit ourselves to C++20 features available
in GCC 10.
2022-05-04 18:33:07 +02:00
NormannR 5f828e241f Parallelizes local_state_space_iteration_fortran 2022-01-31 18:44:48 +01:00
Sébastien Villemot e155c5cbb2
macOS: fix compilation of MEX files against Homebrew’s octave
It is necessary to link MEX files against Octave libraries, as under Windows.
2021-10-25 18:02:46 +02:00
Sébastien Villemot 91e3348806
Windows package: fix bug introduced in c5120e1278 2021-09-21 18:40:54 +02:00
Sébastien Villemot c5120e1278
Build system: no longer link MEX for Octave against liboctave and other libraries
Since Octave 5, mkoctfile no longer links MEX files against shared
libraries (other than libc/libstdc++/libgfortran), so we now mimick that
behaviour.
2021-09-21 15:19:49 +02:00
Sébastien Villemot 2a1183e1fa
Fortran MEX: add -Wimplicit-interface to compiler flags
This warns about hard-to-detect bugs where a function is called with an
implicit interface, thus possibly having mismatches in the calling sequence.
2021-06-04 12:57:39 +02:00
Sébastien Villemot 0741963ca5
Build system: streamline handling of compilation flags for MEX
— allow the user to override compilation flags for MATLAB MEX (it was already
  working for the preprocessor, the MEX for Octave and Dynare++)
— increase the symmetry of MEX build infrastructure between MATLAB and Octave
— when linking MEX for Octave, do not add the output of “mkoctfile -p FLIBS”.
  It is unneeded, and it can create a conflict between the system compiler and
  a user-supplied compiler

By the way:
— restore optimization on macOS for C/C++ MEX (it had been removed in
  5df2392a09)
— remove -fno-omit-frame-pointer on MATLAB/Linux, since it would be cancelled
  by subsequent -O2 and should not be needed anyways
— remove FFLAGS under Octave, unused
2021-05-10 14:39:41 +02:00
Sébastien Villemot 3a42c234fe
Fix build failures on Fedora
— FCFLAGS needs to contain the compilation flags used when compiling Octave,
  otherwise it fails at configure stage when looking for gfortran
— Explicitly add -L$OCTLIBDIR, because with Octave 5 it is no longer there, and
  on Fedora the Octave libraries are no in the default linker search path
2020-11-05 18:52:11 +01:00
Sébastien Villemot f7ee0b9441
Build system: add missing -fPIC flag for Fortran 2008 MEX files under Octave 2020-11-05 15:40:14 +01:00
Sébastien Villemot dd1e4d238b
Build system: remove useless rules for preprocessed Fortran 2008 files
Automake actually provides such rules.
2020-01-08 18:37:26 +01:00
Sébastien Villemot c0c95e1ceb
Add Fortran 2008 interface for a subset of BLAS/LAPACK functions 2020-01-06 18:29:47 +01:00
Sébastien Villemot ce9eca366d
Add Fortran 2008 interface for a subset of MEX functions 2020-01-06 18:29:47 +01:00
Sébastien Villemot 47e4649026
Add support for Fortran 2008 in MEX files
By the same token, remove unused support for Fortran 77.
2020-01-06 18:29:47 +01:00
Sébastien Villemot 35acc111ff
Windows package: fix random build failure due to race condition
The MEX files are built out-of-tree (because we want to do them in parallel).
This would create a potential race condition if several builds want to create
the symlinks under mex/matlab/ or mex/octave/.

The solution is to disable those symlinks for out-of-tree builds.
2019-09-04 11:39:52 +02:00
Sébastien Villemot bae1fa255a
Add scripts and CI job for building Windows package
The scripts are based the former “dynare-build” project. They have been
overhauled and simplified.

Building a Windows package (both installer and zip archive) is as easy as
running “make -C windows” (provided the right Debian packages are installed,
use the “windows/install-packages.sh” script for that purpose).

The layout of MEX files for Octave in the package has been
changed (mex/octave/win32/ and mex/octave/win64/ instead of mex/octave32/ and
mex/octave/), for consistency with MATLAB MEX.
2019-09-03 21:36:47 +02:00
Stéphane Adjemian (Charybdis) 537e384122 Fixed make parallel mode (missing dependency in automake). 2016-12-01 23:25:01 +01:00
Sébastien Villemot 9b5a09958c Fixes to make install.
- fix DESTDIR for preprocessor and MEX files (it was duplicated)
- don't install libdynare++.a
2014-07-18 12:15:36 +02:00
Houtan Bastani 8d2b79a224 make install, closes #576 2014-07-16 16:18:06 +02:00
Sébastien Villemot 513ae741e3 Build system for MEX/Octave: use Octave's LDFLAGS in the configure script
This will facilitate the detection of UMFPACK under Windows
2013-03-29 15:07:58 +01:00
Sébastien Villemot 3d39d77917 Remove spurious executable permissions 2012-10-13 16:10:01 +02:00
Sébastien Villemot 3e612e0211 Fix build system with Automake 1.12 2012-09-28 17:31:39 +02:00
Sébastien Villemot a66594caed Add MEXEXT define to build system, adapt relevant DLL and Windows packaging
Closes: #235
2012-01-09 12:39:09 +01:00
Sébastien Villemot 2185924081 Build system: fix for Octave 3.4 2011-12-28 13:05:30 +01:00
Sébastien Villemot d33f149178 Windows package: build against Octave 3.4.3 2011-12-26 18:00:08 +01:00
Sébastien Villemot 479b2be602 Build system: added missing PIC flag for Fortran code in Octave DLLs 2010-11-18 11:10:49 +01:00
Sébastien Villemot 69fc0e320b New oct-file "qzcomplex" for bringing the complex QZ decomposition to Octave. Fixes issues with partial information under Octave. 2010-10-21 12:33:18 +02:00
Sébastien Villemot 00c73845e0 Build system: further fixes for possibly empty directories (needed because of Git migration) 2010-02-01 10:50:29 +01:00
Sébastien Villemot d6aa4f1329 Build system: create empty directories (needed because of Git migration) 2010-01-29 15:13:34 +01:00
sebastien 343e0b3c7d Build system: refactored the build system for MEX files, using two sub-packages with their own configure scripts
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3019 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-02 17:22:19 +00:00