On Fri, 2010-12-24 at 02:04 +0000, Mateusz Loskot wrote:
...
> Hmm, it looks we would need to change a bit the layout of repo and bury
> the headers in Git,
> inside to /include/soci but keep .cpp files in /src/
> 
> Best regards,


I would propose a different approach:
keep using non buried headers for building soci itself, but the public
api headers use buried includes by default.
The .cpp files need no change.

e.g soci-sqlite3.h:
#include <vector>
#ifdef SOCI_HEADERS_NOT_BURIED
#include "soci-backend.h"
#else
#include <soci/soci-backend.h>
#endif

This way the repository does not need reorganizing, only
SOCI_HEADERS_NOT_BURIED needs to be defined in the build.

The headers which are public now do not require additional include paths
provided by the user.

If the user wants to use the non-buried variant he can still do so by
defining SOCI_HEADERS_NOT_BURIED and adding the include paths manually.
g++ sqlite3.cpp -DSOCI_HEADERS_NOT_BURIED -I/usr/include/soci (+linking)
the others can just use:
g++ sqlite3.cpp (+linking)

This would also be very little work. We only need to change the public
headers installed in subfolders (= backends).

Best Regards,
Julian Taylor

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to