function [buildDir, rootDir, uninstrumentedBuildDir] = accelBuildDir(modelName, okayToPushNags)
%

%   Copyright 2014-2020 The MathWorks, Inc.
    
    folders = Simulink.filegen.internal.FolderConfiguration(modelName);
    buildDir = folders.Accelerator.absolutePath('ModelCode');
    rootDir = folders.Accelerator.Root;
    
    if ~bdIsLoaded(modelName) || (bdIsLoaded(modelName) && isequal(get_param(modelName, 'RecordCoverage'), 'off'))
        uninstrumentedBuildDir = buildDir;
    else
        uninstrumentedBuildDir = Simulink.filegen.internal.Helpers.getUninstrumentedAccelDir(modelName);
    end
    
    rtw_checkdir;
    coder.internal.folders.MarkerFile.checkAccelFolderConfiguration(folders, okayToPushNags);
end

% LocalWords:  checkslprjdir
