summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-08-06 12:22:42 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-08-06 12:23:14 (GMT)
commitbe095b3e7fcaf3773a994f546adafb383324e78b (patch)
tree4cbe73cb9c656009c5998007a21c21322314d3f6 /Modules
parentbed7ee11b7b080e49fbdc107674140eecd4cd5b1 (diff)
parentf34f6eb3d160d500c5c5e2cba131d64c75aa046a (diff)
downloadCMake-be095b3e7fcaf3773a994f546adafb383324e78b.zip
CMake-be095b3e7fcaf3773a994f546adafb383324e78b.tar.gz
CMake-be095b3e7fcaf3773a994f546adafb383324e78b.tar.bz2
Merge topic 'FindMatlab-mcc'
f34f6eb3d1 FindMatlab: Add component to find MCC, the Matlab compiler Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2233
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMatlab.cmake23
1 files changed, 22 insertions, 1 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index ddf22d1..9e13fc3 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -25,6 +25,7 @@
# available on the MCR version, and will yield an error if the MCR is found
# instead of the regular Matlab installation.
# * ``MEX_COMPILER`` the MEX compiler.
+# * ``MCC_COMPILER`` the MCC compiler, included with the Matlab Compiler add-on.
# * ``SIMULINK`` the Simulink environment.
#
# .. note::
@@ -110,7 +111,10 @@
# the whole set of libraries of Matlab
# ``Matlab_MEX_COMPILER``
# the mex compiler of Matlab. Currently not used.
-# Available only if the component ``MEX_COMPILER`` is asked
+# Available only if the component ``MEX_COMPILER`` is requested.
+# ``Matlab_MCC_COMPILER``
+# the mcc compiler of Matlab. Included with the Matlab Compiler add-on.
+# Available only if the component ``MCC_COMPILER`` is requested.
#
# Cached variables
# """"""""""""""""
@@ -1420,6 +1424,7 @@ if(DEFINED Matlab_ROOT_DIR_LAST_CACHED)
Matlab_INCLUDE_DIRS
Matlab_MEX_LIBRARY
Matlab_MEX_COMPILER
+ Matlab_MCC_COMPILER
Matlab_MAIN_PROGRAM
Matlab_MX_LIBRARY
Matlab_ENG_LIBRARY
@@ -1660,6 +1665,22 @@ if(_matlab_find_simulink GREATER -1)
endif()
unset(_matlab_find_simulink)
+# component MCC Compiler
+list(FIND Matlab_FIND_COMPONENTS MCC_COMPILER _matlab_find_mcc_compiler)
+if(_matlab_find_mcc_compiler GREATER -1)
+ find_program(
+ Matlab_MCC_COMPILER
+ "mcc"
+ PATHS ${Matlab_BINARIES_DIR}
+ DOC "Matlab MCC compiler"
+ NO_DEFAULT_PATH
+ )
+ if(Matlab_MCC_COMPILER)
+ set(Matlab_MCC_COMPILER_FOUND TRUE)
+ endif()
+endif()
+unset(_matlab_find_mcc_compiler)
+
unset(_matlab_lib_dir_for_search)
set(Matlab_LIBRARIES ${Matlab_MEX_LIBRARY} ${Matlab_MX_LIBRARY} ${Matlab_ENG_LIBRARY} ${Matlab_MAT_LIBRARY})