Main Content

Speed Up Compilation by Generating Only Code

To speed up compilation, you can generate only code. When you generate only code, MATLAB® Coder™ does not invoke the make command or generate compiled object code. When you iterate between modifying MATLAB code and generating C/C++ code, and you want to inspect the generated code, using this option saves time.

To generate only code, use one of these approaches:

  • At the command line, use the codegen function with the -coption.

  • In a code configuration object, set the GenCodeOnly parameter to true.

  • In the Code Generation Settings dialog box, select the Generate code only check box.

  • In the MATLAB Coder app, if you generate standalone code, click Generate Code. If you generate a MEX function, click Generate Code and Build > Generate Code.

See Also

Topics