mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
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.
This commit is contained in:

committed by
Brad King

parent
89845851a7
commit
a3c389cb17
@@ -992,7 +992,10 @@ function(matlab_add_mex)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT Matlab_VERSION_STRING VERSION_LESS "9.4") # For 9.4 (R2018a) and newer, add API macro
|
||||
# For 9.4 (R2018a) and newer, add API macro.
|
||||
# Add it for unknown versions too, just in case.
|
||||
if(NOT Matlab_VERSION_STRING VERSION_LESS "9.4"
|
||||
OR Matlab_VERSION_STRING STREQUAL "unknown")
|
||||
if(${${prefix}_R2018a})
|
||||
set(MEX_API_MACRO "MATLAB_DEFAULT_RELEASE=R2018a")
|
||||
else()
|
||||
|
Reference in New Issue
Block a user