function copyBuildTool(h,src)
%

%   Copyright 2014-2020 The MathWorks, Inc.

if ~strcmp( class( h ), class( src ) )
    error( message( 'coder_compile:toolchain:CannotCloneClassMismatch', class( src ), class( h ) ) );
end
h.Name = src.Name;
h.Language = src.Language;
h.IncludeFiles = src.IncludeFiles;
h.Command.clone( src.Command );
h.Path.clone( src.Path );
coder.make.internal.copyListProperty( 'Directives', src, h );
coder.make.internal.copyListProperty( 'FileExtensions', src, h );
h.OptionsRegistry = src.OptionsRegistry;
h.IncludePaths = src.IncludePaths;
h.Libraries = src.Libraries;
h.Sources = src.Sources;
h.DerivedFileExtensions = src.DerivedFileExtensions;
h.InputFileExtensions = src.InputFileExtensions;
h.OutputFileExtensions = src.OutputFileExtensions;
h.SupportedOutputs = src.SupportedOutputs;
h.CustomValidation = src.CustomValidation;
h.CommandPattern = src.CommandPattern;
h.IsDefaultTool = src.IsDefaultTool;
h.SupportedStandard = src.SupportedStandard;
end
