function slexVariantSubsystemsWithParSim_script_setup(mdl)
 % Temporarily change the current folder on the workers to an empty
 % folder so that any existing slprj folder on the client does not
 % interfere in the build process.
 currentFolder = pwd;
 tempDir = tempname;
 mkdir(tempDir);
 cd (tempDir);
 oc = onCleanup(@() cd (currentFolder));
 Simulink.BlockDiagram.buildRapidAcceleratorTarget(mdl);
end
