20 lines
628 B
Matlab
20 lines
628 B
Matlab
function setUpProject()
|
|
%setUpProject Configure the environment for this project
|
|
%
|
|
% Set up the environment for the current project. This function is set to
|
|
% Run at Startup.
|
|
|
|
% Copyright 2013-2019 The MathWorks, Inc.
|
|
|
|
% Use Simulink Project API to get the current project:
|
|
p = slproject.getCurrentProject;
|
|
|
|
projectRoot = p.RootFolder;
|
|
% Set the location of slprj to be the "work" folder of the current project:
|
|
myCacheFolder = fullfile(projectRoot, 'work');
|
|
if ~exist(myCacheFolder, 'dir')
|
|
mkdir(myCacheFolder)
|
|
end
|
|
Simulink.fileGenControl('set', 'CacheFolder', myCacheFolder, ...
|
|
'CodeGenFolder', myCacheFolder);
|