Explorar o código

Merge topic 'FindMatlab-unknown-version'

a3c389cb17 FindMatlab: set MATLAB_DEFAULT_RELEASE for unknown version

Acked-by: Kitware Robot <[email protected]>
Merge-request: !4986
Brad King %!s(int64=5) %!d(string=hai) anos
pai
achega
13b5588a86
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      Modules/FindMatlab.cmake

+ 4 - 1
Modules/FindMatlab.cmake

@@ -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()