function setBuildToolDirective(h,buildtool,name,value)

%   Copyright 2014-2020 The MathWorks, Inc.

narginchk( 4, 4 );
name = convertStringsToChars(name);
value = convertStringsToChars(value);
if ischar( name )
    toolObj = h.getBuildTool( buildtool );
    toolObj.setDirective( name, value );
elseif iscell( name ) && iscellstr( value )
    toolObj = h.getBuildTool( buildtool );
    for i = 1:numel( name )
        toolObj.setFileExtension( name{ i }, value{ i } );
    end
else
    error( message( 'coder_compile:toolchain:InvalidInputFormat' ) );
end
end
