작성자: 이담호
관리자: 이담호/CS-STATIC
수정일: 2020-11-03
※ 해당 가이드는 STATIC 4.1.6 혹은 CSBuild 2.2 이상의 버전에서 동작합니다
.STATICFILE 을 생성한다.
$ csbuild --new
GNU 컴파일러를 사용하는 경우 parser.sconf와 .STATICFILE을 같이 생성한다.
$ csbuild --new --cc gcc --cxx g++ --cflag="[여기에CFLAG옵션작성]" --cxxflag="[여기에CXXFLAG옵션작성]"
$ csbuild --new --cc gcc --cxx g++
specfile을 생성할 수 있다.
$ csbuild --new --specfile
.STATICFILE 의 conf 옵션을 추가할 수 있다.
$ csbuild --new --cc gcc --cxx g++ --cscxxflag "[CPP conf 옵션]" --csccflag "[C conf 옵션]"
ex)
$ csbuild --new --cc gcc --cxx g++ --cscxxflag "rtti<cs_delim>cs_encoding" --csccflag "c99<cs_delim>cs_encoding"
STATIC 서버에 분석에 필요한 파일을 업로드하지 않고 로컬에서만 수집한다.
Options
$ csbuild capture --help
> Suresoft (R) CODESCROLL CSBUILD 2.1 ([v20062209-STATIC4.1.4-1195-g376c04d6f])
usage: csbuild capture [-e|--edg] [-v|--valid] [BUILD_COMMAND]
positional arguments:
BUILD_COMMAND Command to build source or script
optional arguments:
-e, --edg Capture using built-in preprocessor
-v, --valid Verify Translation Unit before uploading to STATIC
-p, --post_processing
Capture processing without actual running user commands
-s SPEC_FILE, --spec_file SPEC_FILE
Capture using spec file
-h, --help Show the command of csbuild capture mode
> Finished(00:00:00)
사용 예제
Preprocessor 로 Built-in(EDG) 사용 모드
$ csbuild capture -e make
HOOK 사용 모드
$ csbuild capture make
캡쳐와 함께 validation 을 같이 수행하는 모드
$ csbuild capture -v make
specfile 을 사용한 캡쳐 모드
$ csbuild capture -s ".spec"
이미 빌드한 정보를 가지고 다시 캡쳐하는 모드
$ csbuild capture -p
이미 빌드한 정보를 가지고 Built-in(EDG) 사용 모드로 다시 캡쳐하는 모드
$ csbuild capture -p -e