Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to set compiler path in cpptestcli?

alperen
alperen Posts: 6

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?

Tagged:

Comments

  • Andrey Madan
    Andrey Madan Posts: 388 ✭✭✭
    edited October 2017

    Have you gotten this project to work via GUI first?

  • alperen
    alperen Posts: 6
    edited October 2017

    Yes as I said above:

    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

    My test works fine in Parasfot IDE. I guess, it is because the IDE allows me to configure compiler setting(family, c compiler, c++ compiler and linker), and I can't do it in cmd.

    Maybe I should use --cpptestscanEnvars option or other environment variable option while creating bdf but I don't know. I just added "cpptestscan" and "cpptestscanProjectName" as prefix:
    cpptestscan --cpptestscanProjectName=foo COMPILE_COMMAND

Tagged