Skip to content

Feat/gcov cmake#1

Draft
mharshe wants to merge 4 commits intomharshe:masterfrom
abougouffa:feat/gcov-cmake
Draft

Feat/gcov cmake#1
mharshe wants to merge 4 commits intomharshe:masterfrom
abougouffa:feat/gcov-cmake

Conversation

@mharshe
Copy link
Owner

@mharshe mharshe commented Apr 16, 2024

todo : make the paths tramp compatible

For CMake projects, the `.gcov` files aren't stored beside the source file, instead, they are placed next to the generated object files (in CMake projects, it will be somewhere like `path/to/build/dir/CMakeFiles/target.src/path/to/file/file.cpp.gcov`)

Also, as CMake generates object files as `file.cpp.o` instead of `file.o`, gcov generates a file based on that `file.cpp.gcov` and not `file.gcov`.

I've added a function which leverages the information included in the `compile_commands.json`, it extracts the build directory and build command for the file, and then constructs the path to the `.gcov` file which will be next to the `.o` file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants