From 758b3799a8afca1bcfcc80f1863d99417a8de1eb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 5 Aug 2016 17:46:11 +0200 Subject: Initial take on build2-based build Only C++11 is supported with GCC 4.8 and up and VC 14 and up. This change also introduces the ODB_THREADS_CXX11 threading model. It is the default for the build2 build but can be disabled with a global ODB_THREADS_NONE define (global means that it should be in effect both when building and using the library). --- odb/buildfile | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 odb/buildfile (limited to 'odb/buildfile') diff --git a/odb/buildfile b/odb/buildfile new file mode 100644 index 0000000..e2e73f2 --- /dev/null +++ b/odb/buildfile @@ -0,0 +1,125 @@ +# file : odb/buildfile +# copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +lib{odb}: \ + {hxx }{ cache-traits } \ + {hxx cxx}{ callback } \ + {hxx ixx txx cxx}{ connection } \ + {hxx }{ container-traits } \ + {hxx }{ core } \ + {hxx ixx txx cxx}{ database } \ + {hxx }{ exception } \ + {hxx cxx}{ exceptions } \ + {hxx }{ forward } \ + {hxx }{ function-table } \ + {hxx }{ lazy-pointer-traits } \ + {hxx ixx txx }{ lazy-ptr } \ + {hxx ixx txx cxx}{ lazy-ptr-impl } \ + {hxx }{ nested-container } \ + {hxx txx }{ no-id-object-result } \ + {hxx }{ no-op-cache-traits } \ + {hxx }{ nullable } \ + {hxx }{ object-result } \ + {hxx }{ pointer-traits } \ + {hxx }{ polymorphic-info } \ + {hxx ixx txx }{ polymorphic-map } \ + {hxx txx }{ polymorphic-object-result } \ + {hxx }{ post } \ + {hxx }{ pre } \ + {hxx cxx}{ prepared-query } \ + {hxx ixx txx cxx}{ query-dynamic } \ + {hxx }{ query } \ + {hxx txx cxx}{ result } \ + {hxx cxx}{ schema-catalog } \ + {hxx }{ schema-catalog-impl } \ + {hxx }{ schema-version } \ + {hxx cxx}{ section } \ + {hxx ixx txx cxx}{ session } \ + {hxx txx }{ simple-object-result } \ + {hxx cxx}{ statement } \ + {hxx }{ statement-processing-common } \ + { cxx}{ statement-processing } \ + {hxx }{ std-array-traits } \ + {hxx }{ std-deque-traits } \ + {hxx }{ std-forward-list-traits } \ + {hxx }{ std-list-traits } \ + {hxx }{ std-map-traits } \ + {hxx }{ std-set-traits } \ + {hxx }{ std-unordered-map-traits } \ + {hxx }{ std-unordered-set-traits } \ + {hxx }{ std-vector-traits } \ + {hxx cxx}{ tracer } \ + {hxx }{ traits } \ + {hxx ixx cxx}{ transaction } \ + {hxx ixx }{ vector } \ + {hxx ixx cxx}{ vector-impl } \ + {hxx txx }{ vector-traits } \ + {hxx }{ version } \ + {hxx }{ view-image } \ + {hxx txx }{ view-result } \ + {hxx }{ wrapper-traits } \ + details/{hxx cxx}{ buffer } \ + details/{hxx }{ condition } \ + details/{hxx }{ config } \ + details/{hxx }{ c-string } \ + details/{hxx }{ exception } \ + details/{hxx }{ export } \ + details/{hxx ixx txx }{ function-wrapper } \ + details/{hxx }{ lock } \ + details/{hxx }{ mutex } \ + details/{hxx }{ shared-ptr-fwd } \ + details/{hxx }{ shared-ptr } \ + details/{hxx cxx}{ thread } \ + details/{hxx }{ tls } \ + details/{hxx }{ transfer-ptr } \ + details/{hxx }{ type-info } \ + details/{hxx }{ unique-ptr } \ + details/{hxx }{ unused } \ + details/{hxx }{ wrapper-p } \ + details/build2/{h }{ config } \ + details/build2/{h }{ config-vc } \ + details/meta/{hxx }{ answer } \ + details/meta/{hxx }{ class-p } \ + details/meta/{hxx }{ polymorphic-p } \ + details/meta/{hxx }{ remove-const } \ + details/meta/{hxx }{ remove-const-volatile } \ + details/meta/{hxx }{ remove-pointer } \ + details/meta/{hxx }{ remove-volatile } \ + details/meta/{hxx }{ static-assert } \ +details/shared-ptr/{hxx ixx txx cxx}{ base } \ +details/shared-ptr/{hxx }{ counter-type } \ +details/shared-ptr/{hxx }{ exception } \ + details/win32/{hxx }{ windows } + +cxx.poptions =+ -I$src_root -DLIBODB_BUILD2 +obja{*}: cxx.poptions += -DLIBODB_STATIC_BUILD +objs{*}: cxx.poptions += -DLIBODB_SHARED_BUILD + +lib{odb}: cxx.export.poptions = -I$src_root -DLIBODB_BUILD2 +liba{odb}: cxx.export.poptions += -DLIBODB_STATIC +libs{odb}: cxx.export.poptions += -DLIBODB_SHARED + +# Install into the odb/ subdirectory of, say, /usr/include/. +# +install.include = $install.include/odb +install.include.subdirs = true # Recreate subdirectories. + +if ($cxx.target.class != "windows") + details/win32/: install = false + +# We want these to be picked up even when LIBODB_BUILD2 is not defined. +# +details/build2/: +{ + if ($cxx.id == "msvc") + { + h{config}@./: install = false + h{config-vc}@./: install = $install.include/details + } + else + { + h{config}@./: install = $install.include/details + h{config-vc}@./: install = false + } +} -- cgit v1.1