summaryrefslogtreecommitdiff
path: root/storage/oqgraph
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-09-15 17:29:57 +0200
committerSergei Golubchik <sergii@pisem.net>2010-09-15 17:29:57 +0200
commit6467bcca6067592cb41f789ade920e4af6b71476 (patch)
tree34c5e213023b917c941785dc00f141ac31692d4b /storage/oqgraph
parentaefaf42fc9b0d82f069662dfe800a971a0344dfc (diff)
downloadmariadb-git-6467bcca6067592cb41f789ade920e4af6b71476.tar.gz
oqgraph and sphinx on windows
Diffstat (limited to 'storage/oqgraph')
-rw-r--r--storage/oqgraph/CMakeLists.txt (renamed from storage/oqgraph/CMakeFiles.txt)27
-rw-r--r--storage/oqgraph/Makefile.am18
-rw-r--r--storage/oqgraph/graphcore.cc4
-rw-r--r--storage/oqgraph/plug.in2
4 files changed, 33 insertions, 18 deletions
diff --git a/storage/oqgraph/CMakeFiles.txt b/storage/oqgraph/CMakeLists.txt
index b039c1ddb44..d81dbe323b6 100644
--- a/storage/oqgraph/CMakeFiles.txt
+++ b/storage/oqgraph/CMakeLists.txt
@@ -13,10 +13,25 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
+INCLUDE (CheckCXXSourceCompiles)
+CHECK_CXX_SOURCE_COMPILES(
+"#include <boost/version.hpp>
+#if BOOST_VERSION >= 104000
+#else
+#error oops
+#endif
+int main() { return 0; }" BOOST_OK)
+
+IF(BOOST_OK)
+ INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
+
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_OQGRAPH /EHsc")
+
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include)
+
+ SET(OQGRAPH_SOURCES ha_oqgraph.cc graphcore.cc)
+ MYSQL_STORAGE_ENGINE(OQGRAPH)
+ENDIF()
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
- ${CMAKE_SOURCE_DIR}/regex
- ${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(oqgraph ha_oqgraph.cc)
diff --git a/storage/oqgraph/Makefile.am b/storage/oqgraph/Makefile.am
index 56eea4cb87a..e99e134db02 100644
--- a/storage/oqgraph/Makefile.am
+++ b/storage/oqgraph/Makefile.am
@@ -47,11 +47,11 @@ BOOST_CXXFLAGS+= -funroll-loops -fno-trapping-math
EXTRA_DIST = ha_oqgraph.h ha_oqgraph.cc graphcore.cc \
graphcore-graph.h graphcore-types.h graphcore.h \
- CMakeFiles.txt plug.in oqgraph_probes.d
+ CMakeLists.txt plug.in oqgraph_probes.d
# DTRACE = @DTRACE@
# DTRACEFLAGS = @DTRACEFLAGS@
-# DTRACEFILES = .libs/liboqgraph_engine_la-ha_oqgraph.o
+# DTRACEFILES = .libs/libha_oqgraph_la-ha_oqgraph.o
ORIG_CXXFLAGS = @CXXFLAGS@
CXXFLAGS=
@@ -71,18 +71,18 @@ else
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/regex -I$(top_srcdir)/sql -I$(srcdir) -DHAVE_OQGRAPH
endif !BUILD_OQGRAPH_STANDALONE
-EXTRA_LTLIBRARIES = oqgraph_engine.la
+EXTRA_LTLIBRARIES = ha_oqgraph.la
mysqlplugin_LTLIBRARIES = @plugin_oqgraph_shared_target@
-oqgraph_engine_la_SOURCES = ha_oqgraph.cc
-oqgraph_engine_la_LIBADD = libgraphcore.la
+ha_oqgraph_la_SOURCES = ha_oqgraph.cc
+ha_oqgraph_la_LIBADD = libgraphcore.la
# if HAVE_DTRACE
-# oqgraph_engine_la_LIBADD += oqgraph_probes.o
+# ha_oqgraph_la_LIBADD += oqgraph_probes.o
# endif
-oqgraph_engine_la_LDFLAGS = -module -rpath $(mysqlplugindir)
-oqgraph_engine_la_CFLAGS = $(ORIG_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
-oqgraph_engine_la_CXXFLAGS = $(ORIG_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
+ha_oqgraph_la_LDFLAGS = -shared -module -rpath $(mysqlplugindir)
+ha_oqgraph_la_CFLAGS = $(ORIG_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
+ha_oqgraph_la_CXXFLAGS = $(ORIG_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
# oqgraph_probes.h: oqgraph_probes.d
# $(DTRACE) $(DTRACEFLAGS) -h -s oqgraph_probes.d
diff --git a/storage/oqgraph/graphcore.cc b/storage/oqgraph/graphcore.cc
index 9f479425eeb..0b856ac253f 100644
--- a/storage/oqgraph/graphcore.cc
+++ b/storage/oqgraph/graphcore.cc
@@ -24,7 +24,7 @@
======================================================================
*/
-#include <strings.h>
+#include <string.h>
#define BOOST_ALL_NO_LIB 1
@@ -997,7 +997,7 @@ int stack_cursor::fetch_row(const row &row_info, row &result,
const reference &ref)
{
last= ref;
- if (optional<Vertex> v= last.vertex())
+ if (last.vertex())
{
optional<int> seq;
optional<EdgeWeight> w;
diff --git a/storage/oqgraph/plug.in b/storage/oqgraph/plug.in
index 405afed1f18..38c8310a915 100644
--- a/storage/oqgraph/plug.in
+++ b/storage/oqgraph/plug.in
@@ -1,6 +1,6 @@
MYSQL_STORAGE_ENGINE(oqgraph,,[Graph Storage Engine],
[Open Query Graph Computation Engine], [])
-MYSQL_PLUGIN_DYNAMIC(oqgraph, [oqgraph_engine.la])
+MYSQL_PLUGIN_DYNAMIC(oqgraph, [ha_oqgraph.la])
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(oqgraph, [ha_oqgraph.cc])
MYSQL_PLUGIN_ACTIONS(oqgraph,[
AC_LANG_PUSH([C++])