diff options
author | scivision <scivision@users.noreply.github.com> | 2024-01-17 03:39:11 (GMT) |
---|---|---|
committer | scivision <scivision@users.noreply.github.com> | 2024-01-17 03:39:13 (GMT) |
commit | 6f7d87b40de60ad4241836fa39d12234f430a21f (patch) | |
tree | 2f06317867c0ca4f97f1473d8c5162654a0d11ed /Modules | |
parent | 9e97893147e7233381b545fe20aa192ba2b7dd6b (diff) | |
download | CMake-6f7d87b40de60ad4241836fa39d12234f430a21f.zip CMake-6f7d87b40de60ad4241836fa39d12234f430a21f.tar.gz CMake-6f7d87b40de60ad4241836fa39d12234f430a21f.tar.bz2 |
FindMatlab: use NAMES for find_*
this improves readability especially for custom function
_Matlab_find_library
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindMatlab.cmake | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index f14fa7e..817d86a 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -1332,7 +1332,7 @@ function(_Matlab_get_version_from_root matlab_root matlab_or_mcr matlab_known_ve find_program( _matlab_current_program - matlab + NAMES matlab ${_find_matlab_options} DOC "Matlab main program" ) @@ -1835,7 +1835,7 @@ set(_matlab_required_variables) # the MEX library/header are required find_path( Matlab_INCLUDE_DIRS - mex.h + NAMES mex.h PATHS ${MATLAB_INCLUDE_DIR_TO_LOOK} NO_DEFAULT_PATH ) @@ -1845,7 +1845,7 @@ if(Matlab_Or_MCR STREQUAL "MATLAB" OR Matlab_Or_MCR STREQUAL "UNKNOWN") _Matlab_find_library( ${_matlab_lib_prefix_for_search} Matlab_MEX_LIBRARY - mex + NAMES mex PATHS ${_matlab_lib_dir_for_search} NO_DEFAULT_PATH ) @@ -1861,7 +1861,7 @@ if(Matlab_Or_MCR STREQUAL "MATLAB" OR Matlab_Or_MCR STREQUAL "UNKNOWN") _Matlab_find_library( ${_matlab_lib_prefix_for_search} Matlab_MX_LIBRARY - mx + NAMES mx PATHS ${_matlab_lib_dir_for_search} NO_DEFAULT_PATH ) @@ -1877,7 +1877,7 @@ if(Matlab_HAS_CPP_API) _Matlab_find_library( ${_matlab_lib_prefix_for_search} Matlab_ENGINE_LIBRARY - MatlabEngine + NAMES MatlabEngine PATHS ${_matlab_lib_dir_for_search} DOC "MatlabEngine Library" NO_DEFAULT_PATH @@ -1890,7 +1890,7 @@ if(Matlab_HAS_CPP_API) _Matlab_find_library( ${_matlab_lib_prefix_for_search} Matlab_DATAARRAY_LIBRARY - MatlabDataArray + NAMES MatlabDataArray PATHS ${_matlab_lib_dir_for_search} DOC "MatlabDataArray Library" NO_DEFAULT_PATH @@ -1906,7 +1906,7 @@ if("ENG_LIBRARY" IN_LIST Matlab_FIND_COMPONENTS) _Matlab_find_library( ${_matlab_lib_prefix_for_search} Matlab_ENG_LIBRARY - eng + NAMES eng PATHS ${_matlab_lib_dir_for_search} NO_DEFAULT_PATH ) @@ -1920,7 +1920,7 @@ if("MAT_LIBRARY" IN_LIST Matlab_FIND_COMPONENTS) _Matlab_find_library( ${_matlab_lib_prefix_for_search} Matlab_MAT_LIBRARY - mat + NAMES mat PATHS ${_matlab_lib_dir_for_search} NO_DEFAULT_PATH ) @@ -1933,7 +1933,7 @@ endif() if("SIMULINK" IN_LIST Matlab_FIND_COMPONENTS) find_path( Matlab_SIMULINK_INCLUDE_DIR - simstruc.h + NAMES simstruc.h PATHS "${Matlab_ROOT_DIR}/simulink/include" NO_DEFAULT_PATH ) @@ -1947,7 +1947,7 @@ endif() if("MAIN_PROGRAM" IN_LIST Matlab_FIND_COMPONENTS) find_program( Matlab_MAIN_PROGRAM - matlab + NAMES matlab PATHS ${Matlab_ROOT_DIR} ${Matlab_ROOT_DIR}/bin DOC "Matlab main program" NO_DEFAULT_PATH @@ -1961,7 +1961,7 @@ endif() if("MEX_COMPILER" IN_LIST Matlab_FIND_COMPONENTS) find_program( Matlab_MEX_COMPILER - "mex" + NAMES "mex" PATHS ${Matlab_BINARIES_DIR} DOC "Matlab MEX compiler" NO_DEFAULT_PATH @@ -1975,7 +1975,7 @@ endif() if("MCC_COMPILER" IN_LIST Matlab_FIND_COMPONENTS) find_program( Matlab_MCC_COMPILER - "mcc" + NAMES "mcc" PATHS ${Matlab_BINARIES_DIR} DOC "Matlab MCC compiler" NO_DEFAULT_PATH |