Comments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #3872 (closed defect: fixed)

Opened 9 years ago

Last modified 8 years ago

Add support for gcov -o (--object-directory) option

Reported by: daniel.neuberger@… Owned by: jdsiiro
Priority: normal Milestone:
Component: gcovr Version:
Keywords: Cc:


For people using autotools, it would be helpful to be able to specify that the gcov output files (.gcno and .gcda) are in a .libs directory within their respective folders. The -o option accomplishes this in gcov, but can't be used from within gcovr.



Change History

comment:1 Changed 8 years ago by wehart

  • Status changed from new to closed
  • Resolution set to fixed

I added a --object-directory option to gcovr that allows the user to specify the location of object directories relative to the file that generated them. (See r2519)

comment:2 Changed 8 years ago by jdsiiro

  • Status changed from closed to reopened
  • Resolution fixed deleted

The implementation of --object-directory in [2519:2521] completely breaks gcovr when the option is not provided (and I am not convinced that it produces the correct output when it is provided). A fix will be forthcoming soon.

comment:3 Changed 8 years ago by jdsiiro

Referenced in changeset [2555]:

Overhaul of gcovr's logic for determining gcc/g++'s original working directory. This resolves issues introduced in the original implementation of --object-directory (resolves #3872) and fixes #3883.

comment:4 Changed 8 years ago by jdsiiro

  • Status changed from reopened to closed
  • Resolution set to fixed

The changes in [2555] should fix this.

NOTE: the meaning of --object-directory has changed to be closer to what you would expect to use with gcov/gcc. For most autotools users, you should not need to specify --object-directory (gcovr should be able to correctly figure things out on its own).

comment:5 Changed 8 years ago by daniel.neuberger@…

Just tried this out with the new fixes (the original fixes didn't work for me either) and it works great. Thanks!


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.