aboutsummaryrefslogtreecommitdiff
path: root/odb/profile.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-25 10:35:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-25 10:35:36 +0200
commitd1ad30f7a517e69bc87d1347224f1c9ab38493b3 (patch)
tree95189ae91fcce6366f0a121f67b483f3c1b962e7 /odb/profile.cxx
parent7fc555e53f0a03c93fe31ad9850b1e5d885c44f6 (diff)
Static multi-database support
Add new options (--multi-database, --default-database). Generate common code to -odb.?xx files and database-specific to -odb-<db>.?xx.
Diffstat (limited to 'odb/profile.cxx')
-rw-r--r--odb/profile.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/odb/profile.cxx b/odb/profile.cxx
index fedd7a9..03bf8a4 100644
--- a/odb/profile.cxx
+++ b/odb/profile.cxx
@@ -12,8 +12,6 @@
using namespace std;
-
-
static bool
exist (profile_data::path const& p)
{
@@ -64,6 +62,12 @@ profile_search (char const* prof, void* arg)
if (i == end)
{
+ // Ignore the case where we didn't find the profile and this is the
+ // common database.
+ //
+ if (pd->db == database::common)
+ return string ();
+
cerr << pd->name << ": error: unable to locate options file for profile '"
<< prof << "'" << endl;
throw profile_failure ();