주요 콘텐츠

setPath

Path에서 빌드 툴의 경로 및 매크로 설정

구문

h.setPath(btpath,btmacro)

설명

h.setPath(btpath,btmacro)coder.make.BuildTool.Paths에서 빌드 툴의 경로와 매크로를 설정합니다.

입력 인수

모두 확장

coder.make.BuildTool 객체에 대한 객체 핸들로, 변수로 지정됩니다.

예: tool

BuildTool 객체의 경로로, 스칼라로 반환됩니다.

데이터형: char

BuildTool 객체의 경로에 대한 매크로로, 스칼라로 반환됩니다.

데이터형: char

예제

디폴트 빌드 툴 가져오기 및 속성 설정하기

다음 예제 코드는 MATLAB® Coder™ 빌드 프로세스에 사용자 지정 툴체인 추가하기 튜토리얼의 intel_tc.m 파일 일부에 있는 setPath를 보여줍니다.

% ------------------------------
% C Compiler
% ------------------------------
 
tool = tc.getBuildTool('C Compiler');

tool.setName('Intel C Compiler');
tool.setCommand('icl');
tool.setPath('');

tool.setDirective('IncludeSearchPath','-I');
tool.setDirective('PreprocessorDefine','-D');
tool.setDirective('OutputFlag','-Fo');
tool.setDirective('Debug','-Zi');

tool.setFileExtension('Source','.c');
tool.setFileExtension('Header','.h');
tool.setFileExtension('Object','.obj');

tool.setCommandPattern('|>TOOL<| |>TOOL_OPTIONS<| |>OUTPUT_FLAG<||>OUTPUT<|');

getPath 및 setPath 메서드를 대화형 방식으로 사용하기

이 예제는 MATLAB® 명령 창에서 이러한 메서드에 대한 입력값과 출력값의 예를 보여줍니다.

다음 라인을 입력합니다.

tc = coder.make.ToolchainInfo;
tool = tc.getBuildTool('C Compiler');
tool.getPath
ans  = 

     ''
tool.getPath('macro')
ans  = 

CC_PATH
tool.setPath('/gcc')
tool.Path
ans = 

	Macro  : CC_PATH
	Value : /gcc

버전 내역

R2013a에 개발됨