Commit Graph

77 Commits

Author SHA1 Message Date
Nikolaj Fogh
9c360b9eea FindMatlab: Fix search for MCR
Fixes: #21068, #21582
2020-12-11 11:30:59 -05:00
Nikolaj Fogh
bda5e2ac8f FindMatlab: Only include engine and dataarray libraries if they are found 2020-12-11 11:27:35 -05:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Brad King
bdd0e28782 Merge topic 'FindMatlab-r2020b'
4d292aecb6 FindMatlab: add R2020b => 9.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5233
2020-09-18 08:41:08 -04:00
Michael Hirsch
4d292aecb6 FindMatlab: add R2020b => 9.9 2020-09-17 08:58:21 -04:00
Alexey Kreschuk
a3c389cb17 FindMatlab: set MATLAB_DEFAULT_RELEASE for unknown version
An "unknown" version does not always mean an old version.  Setting this
macro by mistake does not result in a compilation error, but not setting
it does.  I had this error when compiling from a user that does not have
a matlab license.
2020-07-08 08:56:10 -04:00
Michael Hirsch, Ph.D
75331a4578 FindMatlab: Add R2020a=9.8
This allows Matlab R2020a to be recognized as a valid Matlab version.
2020-03-19 12:47:10 -04:00
Brad King
ba0ae1261a Merge topic 'FindMatlab-r2019'
edb6fe3b6a FindMatlab: add R2019a and R2019b MATLAB_VERSIONS_MAPPING

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4207
2020-01-14 08:57:19 -05:00
Silvio Traversaro
b704d58f41 FindMatlab: in matlab_add_mex use the correct version file
Before this modification, the c_mexapi_version.c file was added to
all mex libraries. However, if the C language was not enabled
in the CMake project configuration, the c_mexapi_version.c file
was ignored, creating linking errors in Windows and macOS.
This commit ensures that in the case only the CXX languages is enabled,
the correct version is passed.

Fixes: #19382
2020-01-13 10:52:57 -05:00
Silvio Traversaro
edb6fe3b6a FindMatlab: add R2019a and R2019b MATLAB_VERSIONS_MAPPING
Reference for versions: https://www.mathworks.com/products/compiler/matlab-runtime.html

Fixes: #20087
2020-01-13 10:45:54 -05:00
Raffi Enficiaud
cd6bd8391a FindMatlab: code comment and ordering of the finders 2019-07-15 01:52:07 +02:00
Raffi Enficiaud
9e6206c59b FindMatlab: fixing extension bat file invocation error
If the environment variable MATLAB_ARCH is set prior to the call, the
called scripts do not return an error message.
2019-07-15 01:52:02 +02:00
Raffi Enficiaud
a9b36ea69f FindMatlab: Fixing compilation issues on Windows 2019-07-15 01:46:12 +02:00
Raffi Enficiaud
11e0009b77 FindMatlab: EXCLUDE_FROM_ALL parameter to matlab_add_mex
Enabling a mex target to be excluded from the `all` target.
2019-06-26 19:53:02 +02:00
Brad King
c92f5f6a73 Merge topic 'FindMatlab/issue-19279-mex-compilation-error-on-attribute'
c2595a4958 FindMatlab: removing spaces in compiler define

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3473
2019-06-26 07:11:34 -04:00
Raffi Enficiaud
c2595a4958 FindMatlab: removing spaces in compiler define
Spaces in `DLL_EXPORT_SYM=__attribute__ ((visibility (\"default\")))`
are causing a compilation error.

Fixes: #19279
2019-06-25 07:24:01 -04:00
Brad King
1009fd1860 Merge topic 'matlab-if'
56e89e50d3 FindMatlab: simplify several if()-constructs
51bcdeb17f Tests: simplify checks for Matlab variables being set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3472
2019-06-25 07:15:33 -04:00
Rolf Eike Beer
56e89e50d3 FindMatlab: simplify several if()-constructs 2019-06-24 18:33:48 +02:00
Stefan Lietzau
2454fe84f5 FindMatlab: Support EXACT versions
If an exact version is requested, don't pick the latest matlab version but the one matching
the requested version.

Fixes: #19155
2019-06-24 09:27:39 +02:00
Sebastian Nagel
40176749bc FindMatlab: Tolerate empty version log file 2019-02-11 13:20:55 -05:00
Cris Luengo
42731e94be FindMatlab: Fix linker command under Windows. 2018-10-28 23:12:25 -06:00
Cris Luengo
d7e19032d5 FindMatlab: matlab_add_mex has new options R2017b and R2018a.
- These options are equivalent to `mex` command options `-R2017b` and `-R2018a`.
- `R2017b` is the default, and selects the compatability API.
- `R2018a` is the alternative, and selects the new complex-interleaved API.
- For versions of MATLAB before R2018a, these options are ignored.
- `matlab_add_mex` now works correctly with newer MATLABs.
2018-10-23 23:50:17 -06:00
Cris Luengo
518553d953 FindMatlab: Always find core libraries.
- `MX_LIBRARY`, `Matlab_ENGINE_LIBRARY` and `Matlab_DATAARRAY_LIBRARY` are always found.
- The corresponding options are now ignored.
2018-10-23 23:50:17 -06:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Sean Warren
62709beff8 FindMatlab: Add Matlab 2018a,b to version list 2018-09-26 07:54:50 -04:00
Sean Warren
9a56ed3438 FindMatlab: Explicitly export mexFunction in MSVC
Fixes: #18391
2018-09-26 07:54:01 -04:00
Sean Warren
6c57f6b347 FindMatlab: Optionally allow linking to MatlabEngine and MatlabDataArray
Fixes: #17971
2018-09-26 07:53:50 -04:00
Brad King
488faed3ce Merge topic 'FindMatlab-no-CMAKE_CL_64'
bfe883af60 FindMatlab: Remove erroneous duplicate code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2354
2018-09-06 09:56:36 -04:00
Raffi Enficiaud
bfe883af60 FindMatlab: Remove erroneous duplicate code
This was left accidentally when resolving merge conflicts between
previous changes.

Fixes: #18221
2018-09-05 15:19:50 -04:00
Chuck Atkins
7d9640dbc2 FindMatlab: Guard against nonexistent installation 2018-08-27 14:57:17 -04:00
Brad King
be095b3e7f Merge topic 'FindMatlab-mcc'
f34f6eb3d1 FindMatlab: Add component to find MCC, the Matlab compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2233
2018-08-06 08:23:14 -04:00
Jason Heeris
f34f6eb3d1 FindMatlab: Add component to find MCC, the Matlab compiler
Add component `MCC_COMPILER` to request searching for the Matlab
compiler.  Report it in `Matlab_MCC_COMPILER` if it is found.

Issue: #18183
2018-08-01 09:23:46 -04:00
Julien Schueller
3434c22c29 FindMatlab: only search registry on windows hosts
From Linux, it fails when cross-compiling
2018-08-01 07:40:25 -04:00
luz.paz
be28106880 Fix misc. typos
Found via `codespell` and `grep`
2018-06-04 10:32:49 -04:00
Raffi Enficiaud
59fb9e89b2 FindMatlab: Matlab Runtime Compiler support
* Determining automatically the MCR version on OSX and Windows
* Distinguishing between MCR and Matlab
* Specific tests for the MCR
* mexext on windows does not work properly: the mexext is hardcoded
* Doc updates for the MCR

Fixes: #16487
2018-04-23 10:30:49 -04:00
Rolf Eike Beer
d6883801cd Find*: always include FPHSA shipped with CMake 2018-04-02 10:48:31 +02:00
Luz Paz
3ab7bf8285 Various typo fixes
Some are user-facing. Others are source comments.
2018-01-04 06:52:01 +11:00
Brad King
9f1916aaaa FindMatlab: Avoid if() auto-dereference in 64-bit host detection
If the value of `CMAKE_HOST_SYSTEM_PROCESSOR` also happens to be set as
a variable by a project (e.g. `AMD64`), allowing `if()` to
auto-dereference is unlikely to produce a value that matches "64".
Instead let `if()` auto-dereference `CMAKE_HOST_SYSTEM_PROCESSOR`.

Fixes: #17460
2017-11-15 09:33:56 -05:00
luzpaz
777e87ae00 Fix trivial typos in text
Some are user facing.

Found using

    codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`

whereby the whitelist contained:

    ans
    dum
    helpfull
    emmited
    emmitted
    buil
    iff
    isnt
    nto
    ot
    pathes
    substract
    te
    todays
    upto
    whitespaces
2017-11-03 10:25:05 -04:00
Jamie Snape
f156b2fbfb FindMatlab: Add support for MATLAB 2017b 2017-10-04 09:47:46 -04:00
Brad King
a245f850bc FindMatlab: Fix extraction of quoted version number
The version string in recent Matlab versions has changed.
Now the version number is inside two `'`.

Patch-by: nama on gitlab.kitware.com
Fixes: #17308
2017-09-27 06:56:10 -04:00
Job Noorman
f34ac1c69b FindMatlab: Don't use the deprecated variable CMAKE_CL_64
The variable is not defined on 64-bit MinGW, causing a 32-bit Matlab
version to be found.  Check using CMAKE_SIZEOF_VOID_P instead.
2017-09-08 09:53:27 -04:00
Raffi Enficiaud
5a9c4aeb9a FindMatlab: CUSTOM_TEST_COMMAND documentation fix
Documentation states CUSTOM_MATLAB_COMMAND, while code uses CUSTOM_TEST_COMMAND.
Addresses issue #17107
2017-07-27 21:35:16 +02:00
Raffi Enficiaud
6f04dffb7d FindMatlab: Add support for Matlab 2017a 2017-05-01 09:26:32 -04:00
Brad King
b8c5258b00 Merge topic 'FindMatlab-fix-typo'
f2de7079 FindMatlab: Fix typo in matlab_add_unit_test implementation
2016-11-01 09:14:31 -04:00
Matthew Woehlke
f2de70799c FindMatlab: Fix typo in matlab_add_unit_test implementation
Fix typo in variable used to communicate between matlab_add_unit_test
and its helper script MatlabTestsRedirect.cmake that was introduced in
commit v3.7.0-rc1~116^2 (FindMatlab: Extend matlab_add_unit_test to run
arbitrary test code, 2016-08-30).
2016-10-28 15:19:24 -04:00
Francesco Romano
e29f33cd20 FindMatlab: Add support for Matlab 2016b (9.1) 2016-10-28 10:41:43 -04:00
Brad King
aac66d7974 Merge branch 'FindMatlab-fix-simulink-cache' into release 2016-10-05 09:45:18 -04:00
Raffi Enficiaud
2f16ab87ae FindMatlab: small documentation fixes 2016-10-05 09:39:27 -04:00
Raffi Enficiaud
e8893030e6 FindMatlab: remove SIMULINK path from cache when FindMatlab is reconfigured 2016-10-05 09:39:20 -04:00