You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2006/09/13 03:23:47 UTC

Reorganize C++ build tree.

The current shape of the build tree makes makefiles etc. more
complicated than they need to be. I'd like to turn it "inside out"

cpp
 bin - all executables go here
 lib - all libs go here
 codegen - stylesheets for generated code
 src - .cpp and private .h files. 
 include - public header files
 test/unit - unit tests
 test/system - system tests (client tests)

src, include and both test/ dirs have subdirectories following the C++
namespaces like the current src tree (broker client common/framing etc.)
Unit tests include private .h files out of the src tree. System tests
only need public .h files. 

Speak up if you object or have improvements.

Cheers,
Alan.



Re: Reorganize C++ build tree.

Posted by Alan Conway <ac...@redhat.com>.
Good point, I'll do a bit more homework. Thanks for the pointer.

On Wed, 2006-09-13 at 10:59 -0400, Steve Vinoski wrote:
> On Sep 13, 2006, at 10:48 AM, Alan Conway wrote:
> 
> > On Wed, 2006-09-13 at 08:17 -0400, Kim van der Riet wrote:
> >> Overall I'm do not mind what dir structure we use, so long as its
> >> consistent and easy to maintain. Would you say that this is more
> >> "standard" for C++ projects?
> >
> > More common in my experience but there really is no "standard" :( I'm
> > going to think about this a little more before making the change.
> 
> Agreed -- there is no "standard" in this space that I'm aware of.
> 
> Alan, do you plan to avoid recursive make? If you're changing the dir  
> structure you might also consider fixing that as well.
> 
> <http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html>
> 
> --steve


Re: Reorganize C++ build tree.

Posted by Steve Vinoski <vi...@iona.com>.
On Sep 13, 2006, at 10:48 AM, Alan Conway wrote:

> On Wed, 2006-09-13 at 08:17 -0400, Kim van der Riet wrote:
>> Overall I'm do not mind what dir structure we use, so long as its
>> consistent and easy to maintain. Would you say that this is more
>> "standard" for C++ projects?
>
> More common in my experience but there really is no "standard" :( I'm
> going to think about this a little more before making the change.

Agreed -- there is no "standard" in this space that I'm aware of.

Alan, do you plan to avoid recursive make? If you're changing the dir  
structure you might also consider fixing that as well.

<http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html>

--steve

Re: Reorganize C++ build tree.

Posted by Alan Conway <ac...@redhat.com>.
On Wed, 2006-09-13 at 08:17 -0400, Kim van der Riet wrote:
> Overall I'm do not mind what dir structure we use, so long as its
> consistent and easy to maintain. Would you say that this is more
> "standard" for C++ projects? 

More common in my experience but there really is no "standard" :( I'm
going to think about this a little more before making the change. 



Re: Reorganize C++ build tree.

Posted by Kim van der Riet <ki...@redhat.com>.
Overall I'm do not mind what dir structure we use, so long as its
consistent and easy to maintain. Would you say that this is more
"standard" for C++ projects? Other questions:

1. An additional possible cleanup point: Do we want the dir structure
under src to reflect the namespace exactly? If so, then we need to drop
"common" since this does not form any part of the namespace used for
these sections of code and place these directories directly under src:

src/framing
src/io
src/concurrent
src/broker
src/client
...
etc.

2. How would you define what constitutes a public .h file vs. a
private .h file for this project? Do we need to reconstitute the
existing .h files to separate public from private content?

3. Does the code generated from the stylesheets go into src, under
codegen, or elsewhere?

Kim

On Tue, 2006-09-12 at 21:23 -0400, Alan Conway wrote:
> The current shape of the build tree makes makefiles etc. more
> complicated than they need to be. I'd like to turn it "inside out"
> 
> cpp
>  bin - all executables go here
>  lib - all libs go here
>  codegen - stylesheets for generated code
>  src - .cpp and private .h files. 
>  include - public header files
>  test/unit - unit tests
>  test/system - system tests (client tests)
> 
> src, include and both test/ dirs have subdirectories following the C++
> namespaces like the current src tree (broker client common/framing etc.)
> Unit tests include private .h files out of the src tree. System tests
> only need public .h files. 
> 
> Speak up if you object or have improvements.
> 
> Cheers,
> Alan.
> 
>