Opened 3 years ago

Closed 2 years ago

#13070 closed Patch - Feature (fixed)

Hide generated objects in subdirectories.

Reported by: David Hampton <mythtv@…> Owned by: David Hampton <mythtv@…>
Priority: minor Milestone: 29.0
Component: MythTV - General Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no

Description

Clean up working directories by stashing all the compiler generated objects in hidden subdirectories. This patch is a combination of a suggestion from the "Design Patterns in C++ with Qt" book and code already in the setting.pro file.

Change History (4)

comment:1 Changed 3 years ago by David Hampton <mythtv@…>

comment:2 Changed 3 years ago by Peter Bennett

Does this include the .o files ? The moc_something.cpp files? Executables like mythfrontend?

Will "git clean -xfd" still clean them all? I am not sure if it looks for hidden directories.

Does ccache still work ok with this?

comment:3 Changed 3 years ago by David Hampton <mythtv@…>

This includes the .o files and all files built by moc, but not the libraries or executables.

At the request of gigem, I updated the patch to use the visible directory names 'obj' and 'moc'. Git clean does remove these directories and their contents.

I run with ccache enabled and haven't noticed any issues.

comment:4 Changed 2 years ago by David Hampton <mythtv@…>

Owner: set to David Hampton <mythtv@…>
Resolution: fixed
Status: newclosed

In 9536964fd0d414f15c7da8fef9bff7ae563339d7/mythtv:

Hide generated objects in sub-directories.

Clean up working directories by stashing all the compiler generated
objects in sub-directories. Update the explicitly linked application
.o files found in some of the test programs. Add make 'cleanall'
target that can be used to remove the old moc_* and *.o files, in case
this patch is pulled in without first performing a 'make distclean'.
Fixes #13070.

Note: See TracTickets for help on using tickets.