【发布时间】:2014-05-07 04:10:35
【问题描述】:
我想在我的应用程序中有代码覆盖率,所以在premake.lua 我添加了以下内容:
if options["coverage"] then
tinsert(package.buildoptions, {"-fprofile-arcs", "-ftest-coverage"})
tinsert(package.links, "gcov")
end
然后我运行以下命令:
premake --coverage --target gnu ; make
这在我添加以下内容之前不起作用:
if options["coverage"] then
tinsert(package.buildoptions, {"-fprofile-arcs", "-ftest-coverage"})
tinsert(package.linkoptions, {"-fprofile-arcs"})
tinsert(package.links, "gcov")
end
这是互联网上提出的解决方案。我的问题是我在这个 -fprofile-arcs 链接器标志上找到了 0 个文档......它有什么作用?它在哪里记录?
【问题讨论】:
-
如果您的搜索查询以
-开头,您将无法在 Google 中找到任何内容