1

I'm using Parasoft C++test 9.0. I've used "cpptestscan.exe" to create build data file(bdf), then I want to run my ruleset with "cpptestcli.exe". When I use "New Project -> C++ Test -> Create project from a build data file" in Parasoft IDE(Eclipse based), it allows me to configure compiler setting(family, c compiler, c++ compiler and linker), and it works in IDE. But, when I create project with:

cpptestcli -bdf "%BDF_PATH%\cpptestscan.bdf" -data "%REPO_PATH%"

It creates ".metadata" and "Source(project name)" folders, and creates ".project", ".project", ".project" files in Source folder. Then, if I try to run test with:

cpptestcli -data "%REPO_PATH%" -config "%REPO_PATH%\ruleset.properties" -import "%REPO_PATH%\Source\.project" -showdetails -nobuild -report "%REPORT_PATH%\Report.html"

Because it doesn't use the proper compiler, it gives this error:

Failed checking foo.c - Coding Standards checker: error during parsing file.

How can I tell cpptestcli.exe to use proper compiler? I can't find any option in its help document. Or is any other way to fix this problem?

Alperen
  • 3,772
  • 3
  • 27
  • 49

2 Answers2

0

there is a flag named compiler:

-compiler gcc_4_7

add it and it will use the proper compiler

eran meiri
  • 1,322
  • 3
  • 12
  • 29
0

First fo all, use cpptestcli -list-compilers in order to list the supported compilers. Next, use the appropriate COMPILER ID from the list in -compiler <COMPILER ID>, e.g.

cpptestcli -compiler gcc_7-64 …
Zeta
  • 103,620
  • 13
  • 194
  • 236
  • Thanks for the answer but I cannot reach the project environment now. I was working on it when I was intern. So, I cannot confirm or reject your answer now. As far as I remember, I couldn't use the `-compiler` flag. Parasoft version was very old. I had some other problems and needed [some old commands or stuff](https://stackoverflow.com/a/46275670/6900838) to solve them. I am just writing this down in case of somebody else has the same problem. – Alperen Oct 26 '18 at 07:48
  • I have cpptest 10.4 (current version) at hand. By the way, you can also find the identifiers on https://docs.parasoft.com/display/CPPTEST1033/Supported+Compilers – Zeta Oct 26 '18 at 07:53