summaryrefslogtreecommitdiff
path: root/storage/oqgraph
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-01 00:54:03 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-01 00:54:03 +0100
commit59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5 (patch)
tree3e4a302ccf3912d4d8a40aa271414003bfe7c9b6 /storage/oqgraph
parentce02738d7f2f2688eeec7004dd6a30293d36044f (diff)
parent6b6d40fa6ca1fe36f2a51c2723c58dfb3fc025bb (diff)
downloadmariadb-git-59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5.tar.gz
5.5 merge
Diffstat (limited to 'storage/oqgraph')
-rw-r--r--storage/oqgraph/CMakeLists.txt34
1 files changed, 26 insertions, 8 deletions
diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt
index 593fced6235..7b110b7de5a 100644
--- a/storage/oqgraph/CMakeLists.txt
+++ b/storage/oqgraph/CMakeLists.txt
@@ -11,26 +11,44 @@ IF(MSVC)
SET(BOOST_OK 0)
ELSE()
SET(BOOST_OK 1)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
ENDIF()
ELSE()
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing")
+ STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+ STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# See if that works. On old gcc it'll fail because of -fno-rtti
CHECK_CXX_SOURCE_COMPILES(
"
#include <boost/config.hpp>
#include <boost/property_map/property_map.hpp>
-int main() { return 0; }
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+struct VertexInfo { int id; };
+
+namespace boost
+{
+ namespace graph
+ {
+ template<> struct internal_vertex_name<VertexInfo>
+ { typedef multi_index::member<VertexInfo, int , &VertexInfo::id> type; };
+ }
+}
+
+typedef adjacency_list<vecS, vecS, bidirectionalS, VertexInfo> Graph;
+int main()
+{
+ graph_traits<Graph>::vertex_descriptor *orig;
+ Graph *g;
+ remove_vertex(*orig, *g);
+ return 0;
+}
" BOOST_OK)
ENDIF()
IF(BOOST_OK)
ADD_DEFINITIONS(-DHAVE_OQGRAPH)
- IF(MSVC)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
- ELSE(MSVC)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing")
- STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
- STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
- ENDIF(MSVC)
MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc STORAGE_ENGINE
MODULE_ONLY)