function str = getCompilerCommand(h,buildInfo,targetLanguage,varargin)
%

%   Copyright 2014 The MathWorks, Inc.

if strcmpi( targetLanguage, 'C' )
    toolKey = 'C Compiler';
elseif strcmpi( targetLanguage, 'C++' )
    toolKey = 'C++ Compiler';
elseif strcmpi( targetLanguage, 'Asm' )
    toolKey = 'Assembler';
end
toolOptionKey = toolKey;  % option name is same as tool name
outputFlagKey = 'OutputFlag';
str = h.formCommandFromPattern( buildInfo, 'BuildTool', toolKey, toolOptionKey, outputFlagKey, varargin{ : } );
end
