Mentions légales du service

Skip to content
Snippets Groups Projects
Commit fc0ace11 authored by hhakim's avatar hhakim
Browse files

Update Matlab-gcc versions matching.

parent 1459c348
Branches
Tags
No related merge requests found
...@@ -191,18 +191,25 @@ if( ${MATLAB_DIR_TMP} MATCHES "matlab") ...@@ -191,18 +191,25 @@ if( ${MATLAB_DIR_TMP} MATCHES "matlab")
if(NOT ${GCC_VERSION} MATCHES "LLVM") if(NOT ${GCC_VERSION} MATCHES "LLVM")
message(STATUS "Checking gcc version matches matlab version...") message(STATUS "Checking gcc version matches matlab version...")
#message(STATUS "GCC version is: " ${GCC_VERSION}) #message(STATUS "GCC version is: " ${GCC_VERSION})
string(REGEX REPLACE ".*([0-9]\\.[0-9])\\.[0-9].*" "\\1" GCC_VER_MAJOR_MINOR ${GCC_VERSION}) string(REGEX REPLACE "[^0-9]*([0-9]+\\.[0-9])\\.[0-9].*" "\\1" GCC_VER_MAJOR_MINOR ${GCC_VERSION})
if(${MATLAB_VERSION} MATCHES "R201[67]a" AND NOT ${GCC_VER_MAJOR_MINOR} VERSION_EQUAL "4.9") string(REGEX REPLACE "[^0-9]*([0-9]+)\\.[0-9]\\.[0-9].*" "\\1" GCC_VER_MAJOR ${GCC_VERSION})
message(STATUS "GCC_VER_MAJOR_MINOR: " ${GCC_VER_MAJOR_MINOR})
message(STATUS "MATLAB VERSION: " ${MATLAB_VERSION})
# https://fr.mathworks.com/support/requirements/previous-releases.html
if(${MATLAB_VERSION} MATCHES "R2022[ab]" AND NOT ${GCC_VER_MAJOR} MATCHES "[789]|10")
message(FATAL_ERROR "Error: for Matlab ${MATLAB_VERSION} you must use gcc 7/8/9/10 to compile mex code.")
elseif(${MATLAB_VERSION} MATCHES "R202[01][ab]|R2021b" AND NOT ${GCC_VER_MAJOR} MATCHES "[789]")
message(FATAL_ERROR "Error: for Matlab ${MATLAB_VERSION} you must use gcc 7/8/9 to compile mex code.")
elseif(${MATLAB_VERSION} MATCHES "R201[89][ab]|R2020a" AND NOT ${GCC_VER_MAJOR_MINOR} VERSION_EQUAL "6.3")
message(FATAL_ERROR "Error: for Matlab ${MATLAB_VERSION} you must use gcc 6.3 to compile mex code.")
elseif(${MATLAB_VERSION} MATCHES "R201[67][ab]" AND NOT ${GCC_VER_MAJOR_MINOR} VERSION_EQUAL "4.9")
message(FATAL_ERROR "Error: for Matlab ${MATLAB_VERSION} you must use gcc 4.9 to compile mex code.") message(FATAL_ERROR "Error: for Matlab ${MATLAB_VERSION} you must use gcc 4.9 to compile mex code.")
#https://fr.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2017a_SupportedCompilers.pdf #https://fr.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2017a_SupportedCompilers.pdf
# https://fr.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2016a_SupportedCompilers.pdf # https://fr.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2016a_SupportedCompilers.pdf
elseif(${MATLAB_VERSION} MATCHES "R2014a" AND NOT ${GCC_VER_MAJOR_MINOR} VERSION_EQUAL "4.7") elseif(${MATLAB_VERSION} MATCHES "R2014a" AND NOT ${GCC_VER_MAJOR_MINOR} VERSION_EQUAL "4.7")
message(FATAL_ERROR "Error: for Matlab ${MATLAB_VERSION} you must use gcc 4.7 to compile mex code.") message(FATAL_ERROR "Error: for Matlab ${MATLAB_VERSION} you must use gcc 4.7 to compile mex code.")
# https://fr.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2014a_SupportedCompilers.pdf # https://fr.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2014a_SupportedCompilers.pdf
elseif(NOT ${MATLAB_VERSION} MATCHES "R201[467]")
message(WARNING "Your version of Matlab is most likely not supported by faust matlab wrapper.")
endif() endif()
message(STATUS "GCC_VER_MAJOR_MINOR: " ${GCC_VER_MAJOR_MINOR})
endif() endif()
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment