diff options
author | randomdan <randomdan@localhost> | 2011-01-23 16:43:53 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-01-23 16:43:53 +0000 |
commit | c56ecafcc83f2899445ae7b77c491aa5d1dd07bb (patch) | |
tree | 8e6b32b9d17b9c1d935b06bdc9c89d81b06259b6 | |
parent | Add wrappers and Jam for building with UUIDs from OSSP instead of Boost (diff) | |
download | project2-c56ecafcc83f2899445ae7b77c491aa5d1dd07bb.tar.bz2 project2-c56ecafcc83f2899445ae7b77c491aa5d1dd07bb.tar.xz project2-c56ecafcc83f2899445ae7b77c491aa5d1dd07bb.zip |
Tidy up the UUID optionals
-rw-r--r-- | project2/Jamfile.jam | 17 | ||||
-rw-r--r-- | project2/uuid.cpp | 2 | ||||
-rw-r--r-- | project2/uuid.h | 12 |
3 files changed, 23 insertions, 8 deletions
diff --git a/project2/Jamfile.jam b/project2/Jamfile.jam index 7959ee4..cdffad9 100644 --- a/project2/Jamfile.jam +++ b/project2/Jamfile.jam @@ -20,17 +20,23 @@ lib osspuuid : : <name>ossp-uuid++ ; feature uuid : boost ossp : propagated ; +lib p2uuid : + uuid.cpp + : + <uuid>ossp:<define>OSSP_UUID + <uuid>ossp:<library>osspuuid + ; + lib p2common : appEngine.cpp dataSource.cpp environment.cpp fileStarGlibIoChannel.cpp iHaveParameters.cpp iterate.cpp paramChecker.cpp presenter.cpp rawView.cpp dumpTask.cpp sourceObject.cpp task.cpp variables.cpp view.cpp xmlObjectLoader.cpp exceptions.cpp sessionClearTask.cpp session.cpp sessionSetTask.cpp commonObjects.cpp xmlPresenter.cpp - rowView.cpp rowSet.cpp rowUser.cpp rowProcessor.cpp uuid.cpp + rowView.cpp rowSet.cpp rowUser.cpp rowProcessor.cpp : <library>../libmisc//misc <library>libxmlpp <library>boost_filesystem - <uuid>ossp:<library>osspuuid ; lib p2xml : @@ -69,6 +75,8 @@ lib p2xmlSession : : <library>../libmisc//misc <library>libxmlpp + <library>p2uuid + <uuid>ossp:<define>OSSP_UUID ; lib p2sql : @@ -101,6 +109,7 @@ lib p2web : [ glob cgi/cgi*.cpp ] : <library>p2common <library>cgicc + <uuid>ossp:<define>OSSP_UUID ; exe p2cgi : @@ -114,6 +123,8 @@ exe p2cgi : <library>p2processes <library>p2xml <library>p2xmlSession + <library>p2uuid + <uuid>ossp:<define>OSSP_UUID ; exe p2fcgi : @@ -129,6 +140,8 @@ exe p2fcgi : <library>p2processes <library>p2xml <library>p2xmlSession + <library>p2uuid + <uuid>ossp:<define>OSSP_UUID ; exe p2console : diff --git a/project2/uuid.cpp b/project2/uuid.cpp index 03e851e..6b8bd0d 100644 --- a/project2/uuid.cpp +++ b/project2/uuid.cpp @@ -64,7 +64,7 @@ UUID UUID::generate_random() { UUID u; - u.ossp_uuid.make(UUID_MAKE_V5); + u.ossp_uuid.make(UUID_MAKE_V4); return u; } diff --git a/project2/uuid.h b/project2/uuid.h index 8cb22f3..b4d0e7f 100644 --- a/project2/uuid.h +++ b/project2/uuid.h @@ -4,13 +4,15 @@ #include <iostream> #include <boost/version.hpp> -#if BOOST_VERSION < 104200 -//#if 1 -# define USINGOSSPUUID +#ifdef USINGOSSPUUID # include <ossp/uuid++.hh> #else -# define USINGBOOSTUUID -# include <boost/uuid/uuid.hpp> +# if BOOST_VERSION < 104200 +# error "Boost UUIDs required v1.42 or above" +# else +# include <boost/uuid/uuid.hpp> +# define USINGBOOSTUUID +# endif #endif class UUID { |