BASIS  r3148
MatlabTools.cmake File Reference

Enables use of MATLAB Compiler and build of MEX-files. More...

#include "CMakeParseArguments.cmake"
#include "/CommonTools.cmake"
#include "/UtilitiesTools.cmake"
+ Include dependency graph for MatlabTools.cmake:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

function basis_add_mcc_target (in TARGET_NAME, in ARGN)
 Add MATLAB Compiler target.
function basis_add_mex_file (in TARGET_NAME, in ARGN)
 Add MEX-file target.
function basis_build_mcc_target (in TARGET_UID)
 Add custom command for build of MATLAB Compiler target.
function basis_build_mex_file (in TARGET_UID)
 Add custom command for build of MEX-file.
function basis_create_addpaths_mfile ()
 This function writes a MATLAB M-file with addpath() statements.
function basis_generate_matlab_executable (in OUTPUT_FILE, in ARGN)
 Generate MATLAB wrapper executable.
function basis_get_full_matlab_version (out VERSION)
 Determine version of MATLAB installation.
function basis_get_matlab_release (out ARGV1)
 Get release version of MATLAB installation.
function basis_get_matlab_version (out ARGV1)
 Get version of MATLAB installation.
function basis_mexext (out ARGN)
 Determine extension of MEX-files for this architecture.
macro basis_write_addpaths_mfile (in MFILE, in ARGN)
 This function writes a MATLAB M-file with addpath() statements.

Variables

cmake __BASIS_MATLABTOOLS_INCLUDED
option BASIS_COMPILE_MATLAB = ON
 Enable/Disable compilation of MATLAB sources if the MATLAB Compiler is available.
string BASIS_MCC_FLAGS
 Compile flags used to build MATLAB Compiler targets.
cmake BASIS_MCC_RETRY_ATTEMPTS
 Maximum number of retries on MATLAB Compiler license checkout.
cmake BASIS_MCC_RETRY_DELAY
 Delay between retries to build MATLAB Compiler compiled targets on license checkout errors.
cmake BASIS_MEX_TIMEOUT
 Timeout for building MEX-file targets.
cmake BUILD_CMD
cmake BUILD_LOG
cmake BUILD_MFILE
cmake BUILD_OUTPUT
cmake BUILD_OUTPUTS
cmake CC
cmake CFLAGS
cmake COMMAND
cmake CXX
cmake CXXFLAGS
cmake LD
cmake LDFLAGS
cmake LINK_DIR
cmake LINK_LIB

Detailed Description

Enables use of MATLAB Compiler and build of MEX-files.

Copyright (c) 2011, 2012, 2013 University of Pennsylvania. All rights reserved.
See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.

Contact: SBIA Group <sbia-software at uphs.upenn.edu>

Definition in file MatlabTools.cmake.


Function Documentation

function basis_generate_matlab_executable ( in  OUTPUT_FILE,
in  ARGN 
)

Generate MATLAB wrapper executable.

This function writes a Bash script on Unix or a Windows Command script on Windows platforms which execute the specified MATLAB command using the -r option of the matlab executable and the -nodesktop and -nosplash options. It is used by the build scripts generated by the basis_build_mcc_target() in order to build an executable from MATLAB source files without the use of the MATLAB Compiler. In this case, the MATLAB source files are simply copied to the installation directory and the wrapper script written by this function used to execute the main function with the command-line arguments passed on to this executable.

Parameters:
[in]OUTPUT_FILEName of the output executable file.
[in]ARGNThe remaining options
DESTINATION dir Installation destination. (default: directory of OUTPUT_FILE)
COMMAND name Name of the MATLAB command to execute, i.e., the name of the main function.
STARTUP mfile Absolute path of a startup M-file.
MATLABPATH dir1[ dir2...] List of directories to be added to the MATLAB search path.
OPTIONS opt1[ opt2...] Additional options to pass on to the matlab executable.
Returns:
Nothing.

Variable Documentation

Definition at line 16 of file MatlabTools.cmake.

cmake BUILD_CMD

Definition at line 1305 of file MatlabTools.cmake.

cmake BUILD_LOG

Definition at line 1306 of file MatlabTools.cmake.

cmake BUILD_MFILE

Definition at line 1310 of file MatlabTools.cmake.

cmake BUILD_OUTPUT

Definition at line 1307 of file MatlabTools.cmake.

Definition at line 1308 of file MatlabTools.cmake.

cmake CC

Definition at line 1187 of file MatlabTools.cmake.

cmake CFLAGS

Definition at line 1190 of file MatlabTools.cmake.

cmake COMMAND

Definition at line 1316 of file MatlabTools.cmake.

cmake CXX

Definition at line 1196 of file MatlabTools.cmake.

cmake CXXFLAGS

Definition at line 1199 of file MatlabTools.cmake.

cmake LD

Definition at line 1205 of file MatlabTools.cmake.

cmake LDFLAGS

Definition at line 1183 of file MatlabTools.cmake.

cmake LINK_DIR

Definition at line 1260 of file MatlabTools.cmake.

cmake LINK_LIB

Definition at line 1275 of file MatlabTools.cmake.