将覆盖率扫描添加到Qt应用程序



我正试图将Coverity Scan静态分析添加到我的Qt项目中,但无法获得结果。

我下载了coverity扫描构建工具,并使用以下命令行:

cov-build --dir cov-int make

生成以下日志:

...
my build log
...
[WARNING] No files were emitted. This may be due to a problem with your configuration
or because no files were actually compiled by your build command.
Please make sure you have configured the compilers actually used in the compilation.
For more details, please look at:
    /Users/martin/dev/builds/ConsoleTest01-Desktop_Qt_5_3_clang_64bit-Debug/cov-int/build-log.txt

我怎样才能走得更远?

我在MacOS 10.9下使用Qt 5.3.2。

我没有足够仔细地阅读文档:https://scan.coverity.com/download?tab=cxx我必须首先通过运行来配置覆盖率

cov-configure --comptype clangcxx --compiler clang++ --template

您需要首先运行qmake,然后才能使用make运行cov int命令。

我发现在QtCreator创建的构建文件夹中运行cov-int是最简单的。

最新更新