페이지 트리

버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...


코드 블럭
linenumberstrue
wget https://sonarsource.bintray.com/CommercialDistribution/sonar-cpp-plugin/build-wrapper-3.11.zip

...

다운로드 받은 Build Wrapper를 적절한 폴더로 압축 해제한다. 


코드 블럭
linenumberstrue
unzip unzip build-wrapper-3.11.zip

...

아래 Sample 파일을 참고한다. 

코드 블럭
linenumberstrue
sonar.projectKey=org.sonarqube:cpp-build-wrapper
sonar.projectName=Example of C/C++ Scan (with BuildWrapper)
sonar.projectVersion=1.0

sonar.sources=.
#sonar.sources=src

sonar.language=cpp

# The build-wrapper output dir
sonar.cfamily.build-wrapper-output=bw-outputs

# Encoding of the source files
sonar.sourceEncoding=UTF-8

# SonarQube location
sonar.host.url=http://10.0.1.2


# Key 방식의 로그인 시 인증 정보
# sonar.login=cbcf225a4f5015201228c0fdf9


# ID/PW 로그인 시 아래 주석 해제
sonar.login = admin
sonar.password = admin

...

다음과 같이 build-wrapper-linux-x86-64를 통해 빌드를 수행한다. 

코드 블럭
linenumberstrue
build-wrapper-linux-x86-64 --out-dir bw_output make clean all sonar-scanner 

...

만약 상단의 예제 파일을 이용하였다면, 다음과 같이 구성할 수 있다. 

코드 블럭
linenumberstrue
/build-wrapper-linux-x86-64 --out-dir bw-outputs ./build.sh sonar-scanner

...