资料夹结构
〜/沙盒/ dev
〜/沙盒/测试
现在,将生成a.out和main.gcno文件。
似乎该路径在二进制/ gcno中是硬编码的。
需要进行哪些更改才能在测试目录中生成gcda文件?
最佳答案
By default, the .gcda files are also stored in the same directory as the object file, but the GCC
-fprofile-dir
option may be used to store the .gcda files in a separate directory.
https://gcc.gnu.org/onlinedocs/gcc/Gcov-Data-Files.html
-fprofile-dir tag in GCOV utility
关于c++ - GCOV-在其他文件夹中生成的gcda文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63360206/