summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony T Curtis <antony@xiphis.org>2013-02-21 10:36:25 -0800
committerAntony T Curtis <antony@xiphis.org>2013-02-21 10:36:25 -0800
commit86ed2765bb55e665a1b0c42566775e83cb202bdb (patch)
treef8156e988220d2cfa3c13794dcb07c9521c5fd15
parent694cbb5fb9f42406c3082914e3c94a4841ce5e12 (diff)
downloadmariadb-git-86ed2765bb55e665a1b0c42566775e83cb202bdb.tar.gz
Fix for FindJust.cmake
Make sure that boost is included with consistent config.
-rw-r--r--cmake/FindJudy.cmake2
-rw-r--r--storage/oqgraph/graphcore-config.h40
-rw-r--r--storage/oqgraph/graphcore-graph.cc1
-rw-r--r--storage/oqgraph/graphcore.cc8
-rw-r--r--storage/oqgraph/ha_oqgraph.cc12
-rw-r--r--storage/oqgraph/oqgraph_judy.cc6
-rw-r--r--storage/oqgraph/oqgraph_thunk.h2
7 files changed, 65 insertions, 6 deletions
diff --git a/cmake/FindJudy.cmake b/cmake/FindJudy.cmake
index 6c4bff39d64..45706a67b66 100644
--- a/cmake/FindJudy.cmake
+++ b/cmake/FindJudy.cmake
@@ -19,7 +19,7 @@ ELSE (Judy_INCLUDE_DIR AND Judy_LIBRARIES)
SET(Judy_FOUND FALSE)
ENDIF (Judy_INCLUDE_DIR AND Judy_LIBRARIES)
-IF (Judy)
+IF (Judy_FOUND)
IF (NOT Judy_FIND_QUIETLY)
MESSAGE(STATUS "Found libjudy: ${Judy_LIBRARIES}")
ENDIF (NOT Judy_FIND_QUIETLY)
diff --git a/storage/oqgraph/graphcore-config.h b/storage/oqgraph/graphcore-config.h
new file mode 100644
index 00000000000..4d711bdc53c
--- /dev/null
+++ b/storage/oqgraph/graphcore-config.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 2007-2013 Arjen G Lentz & Antony T Curtis for Open Query
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* ======================================================================
+ Open Query Graph Computation Engine, based on a concept by Arjen Lentz
+ Mk.II implementation by Antony Curtis & Arjen Lentz
+ For more information, documentation, support, enhancement engineering,
+ and non-GPL licensing, see http://openquery.com/graph
+ or contact graph@openquery.com
+ For packaged binaries, see http://ourdelta.org
+ ======================================================================
+*/
+#ifndef oq_graphcore_config_h_
+#define oq_graphcore_config_h_
+
+#define BOOST_ALL_NO_LIB 1
+#define BOOST_NO_RTTI 1
+#define BOOST_NO_TYPEID 1
+
+#ifdef DBUG_OFF
+#define NDEBUG 1
+#endif
+
+#include <boost/config.hpp>
+
+#endif
+
diff --git a/storage/oqgraph/graphcore-graph.cc b/storage/oqgraph/graphcore-graph.cc
index 2160c000922..3568fd243cd 100644
--- a/storage/oqgraph/graphcore-graph.cc
+++ b/storage/oqgraph/graphcore-graph.cc
@@ -24,5 +24,6 @@
======================================================================
*/
+#include "graphcore-config.h"
#include "graphcore-graph.h"
diff --git a/storage/oqgraph/graphcore.cc b/storage/oqgraph/graphcore.cc
index 8433f52761d..5f11bdf605f 100644
--- a/storage/oqgraph/graphcore.cc
+++ b/storage/oqgraph/graphcore.cc
@@ -26,10 +26,7 @@
#include <string.h>
-#define BOOST_ALL_NO_LIB 1
-
-#include <boost/config.hpp>
-
+#include "graphcore-config.h"
#include "graphcore-graph.h"
#include <set>
@@ -46,12 +43,15 @@
#include "graphcore.h"
#include <boost/unordered_map.hpp>
+#include <boost/version.hpp>
using namespace open_query;
using namespace boost;
static const row empty_row = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+extern "C" const char* const oqgraph_boost_version= BOOST_LIB_VERSION;
+
namespace open_query
{
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc
index 46368fc3260..c1ed01ccee0 100644
--- a/storage/oqgraph/ha_oqgraph.cc
+++ b/storage/oqgraph/ha_oqgraph.cc
@@ -831,6 +831,16 @@ void ha_oqgraph::update_create_info(HA_CREATE_INFO *create_info)
struct st_mysql_storage_engine oqgraph_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
+extern "C" const char* const oqgraph_boost_version;
+extern "C" const char* const oqgraph_judy_version;
+
+static struct st_mysql_show_var oqgraph_status[]=
+{
+ { "OQGraph_Boost_Version", (char*) &oqgraph_boost_version, SHOW_CHAR_PTR },
+ /*{ "OQGraph_Judy_Version", (char*) &oqgraph_judy_version, SHOW_CHAR_PTR },*/
+ { 0, 0 }
+};
+
maria_declare_plugin(oqgraph)
{
MYSQL_STORAGE_ENGINE_PLUGIN,
@@ -842,7 +852,7 @@ maria_declare_plugin(oqgraph)
(int (*)(void*)) oqgraph_init, /* Plugin Init */
oqgraph_fini, /* Plugin Deinit */
0x0300, /* Version: 3s.0 */
- NULL, /* status variables */
+ oqgraph_status, /* status variables */
NULL, /* system variables */
"3.0",
MariaDB_PLUGIN_MATURITY_BETA
diff --git a/storage/oqgraph/oqgraph_judy.cc b/storage/oqgraph/oqgraph_judy.cc
index 5a5d5760718..76d38ee50a7 100644
--- a/storage/oqgraph/oqgraph_judy.cc
+++ b/storage/oqgraph/oqgraph_judy.cc
@@ -27,6 +27,12 @@
#include "oqgraph_judy.h"
#include <Judy.h>
+#ifndef JUDY_LIB_VERSION
+#define JUDY_LIB_VERSION "(unknown)"
+#endif
+
+extern "C" const char* const oqgraph_judy_version= JUDY_LIB_VERSION;
+
void open_query::judy_bitset::clear()
{
int rc;
diff --git a/storage/oqgraph/oqgraph_thunk.h b/storage/oqgraph/oqgraph_thunk.h
index 5965bc2dfb0..5fde15fd0b1 100644
--- a/storage/oqgraph/oqgraph_thunk.h
+++ b/storage/oqgraph/oqgraph_thunk.h
@@ -31,6 +31,8 @@
#include <string>
#include <utility>
+#include "graphcore-config.h"
+
#include <boost/intrusive_ptr.hpp>
#include <boost/optional.hpp>
#include <boost/unordered_map.hpp>