removeSourceFiles - Remove source files from build information object - MATLAB (original) (raw)
Main Content
Remove source files from build information object
Since R2021b
Syntax
Description
removeSourceFiles([buildInfo](#mw%5Fdf5ec109-2253-4986-bfde-8bb625bf3c3a),[filenames](#mw%5F14645056-62d0-40c7-803a-52e5fa292fb5),[groups](#mw%5F7af257b5-edd4-4b93-b82f-915b5f5f4096))
removes source file names from build information that is stored in anRTW.BuildInfo
object.
Examples
Suppose you add a list of source files to anRTW.BuildInfo
object, myBuildInfo
.
myBuildInfo = RTW.BuildInfo; addSourceFiles(myBuildInfo, ... {'test1.c' 'test2.c' 'driver1.c' 'driver2.c'}, ... '/proj/src', ... {'Tests' 'Tests' 'Drivers' 'Drivers'});
To remove test1.c
from the object, run:
removeSourceFiles(myBuildInfo, 'test1.c');
To remove test2.c
and driver1.c
, run:
removeSourceFiles(myBuildInfo, {'test2.c' 'driver1.c'});
To remove the names of files that belong to the 'Drivers'
group, run:
removeSourceFiles(myBuildInfo, '', 'Drivers');
Input Arguments
RTW.BuildInfo
object that contains information for compiling and linking generated code.
Example: myBuildInfo
Specify source files that you want to remove from the build information object.
Example: 'test1.c'
Specify groups of source files that you want to remove from the build information object.
Example: {'Tests' 'Drivers'}
Version History
Introduced in R2021b