From 6a07b88cdf6419440b19e7b7dbc9231519c32c62 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 31 Jan 2011 10:53:27 +0200 Subject: Initial Boost profile template --- odb/boost/Makefile.am | 16 ++ odb/boost/details/config.h.in | 14 ++ odb/boost/details/config.hxx | 20 ++ odb/boost/details/export.hxx | 41 ++++ odb/boost/exceptions.cxx | 20 ++ odb/boost/exceptions.hxx | 29 +++ odb/boost/libodb-boost-vc10.vcxproj | 174 ++++++++++++++ odb/boost/libodb-boost-vc10.vcxproj.filters | 19 ++ odb/boost/libodb-boost-vc9.vcproj | 359 ++++++++++++++++++++++++++++ odb/boost/makefile | 96 ++++++++ odb/boost/version.hxx | 44 ++++ 11 files changed, 832 insertions(+) create mode 100644 odb/boost/Makefile.am create mode 100644 odb/boost/details/config.h.in create mode 100644 odb/boost/details/config.hxx create mode 100644 odb/boost/details/export.hxx create mode 100644 odb/boost/exceptions.cxx create mode 100644 odb/boost/exceptions.hxx create mode 100644 odb/boost/libodb-boost-vc10.vcxproj create mode 100644 odb/boost/libodb-boost-vc10.vcxproj.filters create mode 100644 odb/boost/libodb-boost-vc9.vcproj create mode 100644 odb/boost/makefile create mode 100644 odb/boost/version.hxx (limited to 'odb/boost') diff --git a/odb/boost/Makefile.am b/odb/boost/Makefile.am new file mode 100644 index 0000000..55d7816 --- /dev/null +++ b/odb/boost/Makefile.am @@ -0,0 +1,16 @@ +# file : odb/boost/Makefile.am +# author : Boris Kolpackov +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +lib_LTLIBRARIES = libodb-boost.la +libodb_boost_la_SOURCES = __path__(sources) + +odbboostincludedir = $(includedir)/odb/boost/ +nobase_odbboostinclude_HEADERS = __path__(headers) +nobase_nodist_odbboostinclude_HEADERS = details/config.h + +EXTRA_DIST = __file__(extra_dist) + +AM_CPPFLAGS= -I'$(top_builddir)' -I'$(top_srcdir)' -DLIBODB_BOOST_DYNAMIC_LIB +AM_LDFLAGS = -release __value__(interface_version) -no-undefined diff --git a/odb/boost/details/config.h.in b/odb/boost/details/config.h.in new file mode 100644 index 0000000..90330e6 --- /dev/null +++ b/odb/boost/details/config.h.in @@ -0,0 +1,14 @@ +/* file : odb/boost/details/config.h.in + * author : Boris Kolpackov + * copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* This file is automatically processed by configure. */ + +#ifndef ODB_BOOST_DETAILS_CONFIG_H +#define ODB_BOOST_DETAILS_CONFIG_H + +#undef LIBODB_BOOST_STATIC_LIB + +#endif /* ODB_BOOST_DETAILS_CONFIG_H */ diff --git a/odb/boost/details/config.hxx b/odb/boost/details/config.hxx new file mode 100644 index 0000000..fc74d3b --- /dev/null +++ b/odb/boost/details/config.hxx @@ -0,0 +1,20 @@ +// file : odb/boost/details/config.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_BOOST_DETAILS_CONFIG_HXX +#define ODB_BOOST_DETAILS_CONFIG_HXX + +// no pre + +#ifdef _MSC_VER +#elif defined(ODB_COMPILER) +# define LIBODB_BOOST_STATIC_LIB +#else +# include +#endif + +// no post + +#endif // ODB_BOOST_DETAILS_CONFIG_HXX diff --git a/odb/boost/details/export.hxx b/odb/boost/details/export.hxx new file mode 100644 index 0000000..f20bddc --- /dev/null +++ b/odb/boost/details/export.hxx @@ -0,0 +1,41 @@ +// file : odb/boost/details/export.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_BOOST_DETAILS_EXPORT_HXX +#define ODB_BOOST_DETAILS_EXPORT_HXX + +#include + +#include + +#ifdef LIBODB_BOOST_STATIC_LIB +# define LIBODB_BOOST_EXPORT +#else +# ifdef _WIN32 +# ifdef _MSC_VER +# ifdef LIBODB_BOOST_DYNAMIC_LIB +# define LIBODB_BOOST_EXPORT __declspec(dllexport) +# else +# define LIBODB_BOOST_EXPORT __declspec(dllimport) +# endif +# else +# ifdef LIBODB_BOOST_DYNAMIC_LIB +# ifdef DLL_EXPORT +# define LIBODB_BOOST_EXPORT __declspec(dllexport) +# else +# define LIBODB_BOOST_EXPORT +# endif +# else +# define LIBODB_BOOST_EXPORT __declspec(dllimport) +# endif +# endif +# else +# define LIBODB_BOOST_EXPORT +# endif +#endif + +#include + +#endif // ODB_BOOST_DETAILS_EXPORT_HXX diff --git a/odb/boost/exceptions.cxx b/odb/boost/exceptions.cxx new file mode 100644 index 0000000..038efe4 --- /dev/null +++ b/odb/boost/exceptions.cxx @@ -0,0 +1,20 @@ +// file : odb/boost/exceptions.cxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include + +using namespace std; + +namespace odb +{ + namespace boost + { + const char* dummy_exception:: + what () const throw () + { + return "dummy exception"; + } + } +} diff --git a/odb/boost/exceptions.hxx b/odb/boost/exceptions.hxx new file mode 100644 index 0000000..5e5b18c --- /dev/null +++ b/odb/boost/exceptions.hxx @@ -0,0 +1,29 @@ +// file : odb/boost/exceptions.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_BOOST_EXCEPTIONS_HXX +#define ODB_BOOST_EXCEPTIONS_HXX + +#include + +#include + +#include + +namespace odb +{ + namespace boost + { + struct LIBODB_BOOST_EXPORT dummy_exception: odb::exception + { + virtual const char* + what () const throw (); + }; + } +} + +#include + +#endif // ODB_BOOST_EXCEPTIONS_HXX diff --git a/odb/boost/libodb-boost-vc10.vcxproj b/odb/boost/libodb-boost-vc10.vcxproj new file mode 100644 index 0000000..b09479f --- /dev/null +++ b/odb/boost/libodb-boost-vc10.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2C6C42B3-81CA-4697-AA55-AAFDC166CAFE} + Win32Proj + libodb-boost + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + ..\..\bin\ + odb-boost-d-__value__(interface_version)-vc10 + + + true + ..\..\bin64\ + odb-boost-d-__value__(interface_version)-vc10 + + + false + ..\..\bin\ + odb-boost-__value__(interface_version)-vc10 + + + false + ..\..\bin64\ + odb-boost-__value__(interface_version)-vc10 + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions) + ..\.. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + odb-d.lib;%(AdditionalDependencies) + Windows + true + $(TargetPath) + ..\..\lib\odb-boost-d.lib + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions) + ..\.. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + odb-d.lib;%(AdditionalDependencies) + Windows + true + $(TargetPath) + ..\..\lib64\odb-boost-d.lib + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions) + ..\.. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + odb.lib;%(AdditionalDependencies) + Windows + true + true + true + $(TargetPath) + ..\..\lib\odb-boost.lib + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions) + ..\.. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + odb.lib;%(AdditionalDependencies) + Windows + true + true + true + $(TargetPath) + ..\..\lib64\odb-boost.lib + + + +__header_entries__(headers) + + +__source_entries__(sources) + + + + + diff --git a/odb/boost/libodb-boost-vc10.vcxproj.filters b/odb/boost/libodb-boost-vc10.vcxproj.filters new file mode 100644 index 0000000..ac01f4e --- /dev/null +++ b/odb/boost/libodb-boost-vc10.vcxproj.filters @@ -0,0 +1,19 @@ + + + + + {15DBF883-C83E-460B-8F93-44361F5783E3} + cxx + + + {C2A3CC20-2248-4590-ABAC-DE29A478D2BD} + h;hxx;ixx;txx + + + +__header_filter_entries__(headers) + + +__source_filter_entries__(sources) + + diff --git a/odb/boost/libodb-boost-vc9.vcproj b/odb/boost/libodb-boost-vc9.vcproj new file mode 100644 index 0000000..120aebe --- /dev/null +++ b/odb/boost/libodb-boost-vc9.vcproj @@ -0,0 +1,359 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +__source_entries__(sources) + + +__file_entries__(headers) + + + + + diff --git a/odb/boost/makefile b/odb/boost/makefile new file mode 100644 index 0000000..521fb62 --- /dev/null +++ b/odb/boost/makefile @@ -0,0 +1,96 @@ +# file : odb/boost/makefile +# author : Boris Kolpackov +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make + +cxx := exceptions.cxx + +cxx_tun := $(cxx) +cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) +cxx_od := $(cxx_obj:.o=.o.d) + +odb_boost.l := $(out_base)/odb-boost.l +odb_boost.l.cpp-options := $(out_base)/odb-boost.l.cpp-options + +default := $(out_base)/ +dist := $(out_base)/.dist +clean := $(out_base)/.clean + +# Import. +# +$(call import,\ + $(scf_root)/import/libodb/stub.make,\ + l: odb.l,cpp-options: odb.l.cpp-options) + +# Build. +# +$(odb_boost.l): $(cxx_obj) $(odb.l) +$(odb_boost.l.cpp-options): value := -I$(out_root) -I$(src_root) +$(odb_boost.l.cpp-options): $(odb.l.cpp-options) + +$(cxx_obj) $(cxx_od): $(odb_boost.l.cpp-options) $(out_base)/details/config.h + +$(out_base)/details/config.h: + @echo '/* file : odb/boost/details/config.h' >$@ + @echo ' * author : automatically generated' >>$@ + @echo ' */' >>$@ + @echo '' >>$@ + @echo '#ifndef ODB_BOOST_DETAILS_CONFIG_H' >>$@ + @echo '#define ODB_BOOST_DETAILS_CONFIG_H' >>$@ + @echo '' >>$@ + @echo '' >>$@ + @echo '#endif /* ODB_BOOST_DETAILS_CONFIG_H */' >>$@ + +$(call include-dep,$(cxx_od),$(cxx_obj),$(out_base)/details/config.h) + +# Convenience alias for default target. +# +$(out_base)/: $(odb_boost.l) + +# Dist. +# +$(dist): export sources := $(cxx) +$(dist): export headers = $(subst $(src_base)/,,$(shell find $(src_base) \ +-name '*.hxx' -o -name '*.ixx' -o -name '*.txx')) +$(dist): export extra_dist := libodb-boost-vc9.vcproj \ +libodb-boost-vc10.vcxproj libodb-boost-vc10.vcxproj.filters +$(dist): export interface_version = $(shell sed -e \ +'s/^\([0-9]*\.[0-9]*\).*/\1/' $(src_root)/version) + +$(dist): + $(call dist-data,$(sources) $(headers) details/config.h.in) + $(call meta-vc9proj,libodb-boost-vc9.vcproj) + $(call meta-vc10proj,libodb-boost-vc10.vcxproj) + $(call meta-automake) + +# Clean. +# +$(clean): $(odb_boost.l).o.clean \ + $(odb_boost.l.cpp-options).clean \ + $(addsuffix .cxx.clean,$(cxx_obj)) \ + $(addsuffix .cxx.clean,$(cxx_od)) + $(call message,rm $$1,rm -f $$1,$(out_base)/details/config.h) + +# Generated .gitignore. +# +ifeq ($(out_base),$(src_base)) +$(odb_boost.l): | $(out_base)/.gitignore + +$(out_base)/.gitignore: files := details/config.h +$(clean): $(out_base)/.gitignore.clean + +$(call include,$(bld_root)/git/gitignore.make) +endif + +# How to. +# +$(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9proj.make) +$(call include,$(bld_root)/meta/vc10proj.make) +$(call include,$(bld_root)/meta/automake.make) + +$(call include,$(bld_root)/cxx/o-l.make) +$(call include,$(bld_root)/cxx/cxx-o.make) +$(call include,$(bld_root)/cxx/cxx-d.make) diff --git a/odb/boost/version.hxx b/odb/boost/version.hxx new file mode 100644 index 0000000..5a3d102 --- /dev/null +++ b/odb/boost/version.hxx @@ -0,0 +1,44 @@ +// file : odb/boost/version.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_BOOST_VERSION_HXX +#define ODB_BOOST_VERSION_HXX + +#include + +#include + +// Version format is AABBCCDD where +// +// AA - major version number +// BB - minor version number +// CC - bugfix version number +// DD - alpha / beta (DD + 50) version number +// +// When DD is not 00, 1 is subtracted from AABBCC. For example: +// +// Version AABBCCDD +// 2.0.0 02000000 +// 2.1.0 02010000 +// 2.1.1 02010100 +// 2.2.0.a1 02019901 +// 3.0.0.b2 02999952 +// + +// Check that we have compatible ODB version. +// +#if ODB_VERSION != 10100 +# error incompatible odb interface version detected +#endif + +// libodb-boost version: odb interface version plus the bugfix +// version. +// +#define LIBODB_BOOST_VERSION 1010000 +#define LIBODB_BOOST_VERSION_STR "1.1.0" + +#include + +#endif // ODB_BOOST_VERSION_HXX -- cgit v1.1