diff options
author | scivision <scivision@users.noreply.github.com> | 2023-09-15 00:55:01 (GMT) |
---|---|---|
committer | scivision <scivision@users.noreply.github.com> | 2023-09-18 19:07:53 (GMT) |
commit | 8b8135487f50ca34cd3500a968a8ad4c4e126e97 (patch) | |
tree | 29c20f8edc927025e55ab8c00c369b14462a582a /Modules | |
parent | fff5c1507e3a555f9195b3d0d36cf8e263d8c02c (diff) | |
download | CMake-8b8135487f50ca34cd3500a968a8ad4c4e126e97.zip CMake-8b8135487f50ca34cd3500a968a8ad4c4e126e97.tar.gz CMake-8b8135487f50ca34cd3500a968a8ad4c4e126e97.tar.bz2 |
FindMatlab: refactor: remove unneeded syntax
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindMatlab.cmake | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 8bdb6db..7b15897 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -511,8 +511,7 @@ macro(extract_matlab_versions_from_registry_brute_force matlab_versions) # we order from more recent to older if(matlab_supported_versions) list(REMOVE_DUPLICATES matlab_supported_versions) - list(SORT matlab_supported_versions COMPARE NATURAL) - list(REVERSE matlab_supported_versions) + list(SORT matlab_supported_versions COMPARE NATURAL ORDER DESCENDING) endif() set(${matlab_versions} ${matlab_supported_versions}) @@ -1605,10 +1604,6 @@ if(MATLAB_FIND_DEBUG) message(STATUS "[MATLAB] Matlab root folders are ${_matlab_possible_roots}") endif() - - - - # take the first possible Matlab root list(LENGTH _matlab_possible_roots _numbers_of_matlab_roots) set(Matlab_VERSION_STRING "NOTFOUND") @@ -1800,7 +1795,7 @@ endif() # This small stub around find_library is to prevent any pollution of CMAKE_FIND_LIBRARY_PREFIXES in the global scope. # This is the function to be used below instead of the find_library directives. function(_Matlab_find_library _matlab_library_prefix) - set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} ${_matlab_library_prefix}) + list(APPEND CMAKE_FIND_LIBRARY_PREFIXES ${_matlab_library_prefix}) find_library(${ARGN}) endfunction() |