2010/12/24 Mateusz Loskot <[email protected]>
> Denis,
>
> I agree the folder structure change is not very big deal, but
> if it turns to be unnecessary, I'd like to keep the structure as it is
> now. Also, Maciej has gone for holiday and I'd like to discuss such
> changes with him. We could discuss any changes to improve the source
> tree structure after the release. Does Julian's idea work for you?
>
I understand that you would like to minimise the risks for that
so-long-awaited release. So, we could maybe have a 3.1.0 release without
structure change, and right after (or at almost the same time?) a 3.5.0 or
even a 4.0.0 release.
In the meantime, Julian's idea is appealing... but does not work (at least
for me) when SOCI_HEADERS_NOT_BURIED is not set. Following the (expected)
compilation error I got:
[ 34%] Building CXX object
backends/mysql/CMakeFiles/soci_mysql.dir/common.cpp.o
cd /home/dan/dev/soci/socigit/tmp/backends/mysql && /usr/lib64/ccache/c++
-Dsoci_mysql_EXPORTS -DSOCI_ABI_VERSION=3.1 -DHAVE_BOOST=1
-DHAVE_BOOST_DATE_TIME=1 -DHAVE_MYSQL=1 -fPIC -pedantic -ansi -Wall
-Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls
-Wno-long-long -std=c++98 -fPIC -I/usr/include/mysql
-I/home/dan/dev/soci/socigit/src/core -o
CMakeFiles/soci_mysql.dir/common.cpp.o -c
/home/dan/dev/soci/socigit/src/backends/mysql/common.cpp
In file included from
/home/dan/dev/soci/socigit/src/backends/mysql/common.cpp:8:0:
/home/dan/dev/soci/socigit/src/backends/mysql/common.h:14:35: fatal error:
soci/mysql/soci-mysql.h: No such file or directory
compilation terminated.
make[2]: *** [backends/mysql/CMakeFiles/soci_mysql.dir/common.cpp.o] Error 1
Indeed, as I mentioned in a previous post, since the #include directive
refers explicitly to the 'soci/' prefix (#include <soci/xxx.h>), (at least)
the headers must be located in a tree structure having the 'soci' directory
as root.
I do not see how we can work around that issue without changing (slightly)
the directory structure.
All the corresponding changes can be found in the dedicated branch:
https://github.com/denisarnaud/soci/tree/buried_headers
It compiles and links successfully for almost all the back-ends on Linux
(Empty, SQlite3, PostgreSQL, ODBC, Oracle, MySQL; I did not check with
Firebird).
To insulate the changes, I have created four new branches on the GitHub
repository:
* https://github.com/denisarnaud/soci/tree/src and
https://github.com/denisarnaud/soci/tree/src_build, which hold the same code
as <soci top dir of master>/src (without the cmake sub-directory) and as
<soci top dir of master>/src/cmake respectively.
* https://github.com/denisarnaud/soci/tree/src_buried_headers and
https://github.com/denisarnaud/soci/tree/src_build_buried_headers, which
hold the changes supporting burying the headers (the former branch holds the
<soci top dir of buried_headers>/src/soci and the latter branch holds the
<soci top dir of buried_headers>/src/cmake), and which can be easily
compared with the two branches above, i.e., respectively
https://github.com/denisarnaud/soci/tree/src and
https://github.com/denisarnaud/soci/tree/src_build.
Denis
------------------------------------------------------------------------------
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