2013-12-11 13:02:12 +04:00
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
|
|
|
2023-05-30 16:08:41 +02:00
|
|
|
SET(CPACK_RPM_oqgraph-engine_PACKAGE_SUMMARY "OQGraph storage engine for MariaDB server" PARENT_SCOPE)
|
2021-11-22 19:34:47 +07:00
|
|
|
SET(CPACK_RPM_oqgraph-engine_PACKAGE_DESCRIPTION "The Open Query GRAPH computation engine, or OQGRAPH as the engine itself is called,
|
|
|
|
allows you to handle hierarchies (tree structures) and complex graphs
|
|
|
|
(nodes having many connections in several directions).
|
|
|
|
It is intended to be used for retrieving hierarchical information, such as those used for graphs,
|
|
|
|
routes or social relationships, in plain SQL." PARENT_SCOPE)
|
|
|
|
|
2019-05-09 19:12:34 +02:00
|
|
|
MACRO(CHECK_OQGRAPH)
|
2012-09-30 14:49:46 -07:00
|
|
|
MESSAGE(STATUS "Configuring OQGraph")
|
2015-01-19 14:07:29 +01:00
|
|
|
FIND_PACKAGE(Boost 1.40.0)
|
2017-08-09 21:39:18 +02:00
|
|
|
SET_PACKAGE_PROPERTIES(Boost PROPERTIES
|
|
|
|
PURPOSE "Required for the OQGraph storage engine"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
2011-12-30 11:21:39 +01:00
|
|
|
IF(NOT Boost_FOUND)
|
MDEV-6248 GUI-friendly cmake options to enable/disable plugins
* Introduce a set of PLUGIN_xxx cmake options with values
NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
doing MYSQL_ADD_PLUGIN conditionally as before. Because if
MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
2014-06-23 12:09:00 +02:00
|
|
|
MESSAGE(STATUS "Boost not found. OQGraph will not be compiled")
|
2015-09-01 22:00:26 +02:00
|
|
|
SET(OQGRAPH_OK 0 CACHE INTERNAL "")
|
2011-12-30 11:21:39 +01:00
|
|
|
RETURN()
|
|
|
|
ENDIF()
|
|
|
|
INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS})
|
2011-10-19 21:45:18 +02:00
|
|
|
|
2013-02-14 10:38:35 -08:00
|
|
|
FIND_PACKAGE(Judy)
|
2017-08-09 21:39:18 +02:00
|
|
|
SET_PACKAGE_PROPERTIES(Judy PROPERTIES
|
|
|
|
PURPOSE "Required for the OQGraph storage engine"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
2013-02-14 10:38:35 -08:00
|
|
|
IF(NOT Judy_FOUND)
|
2014-01-09 22:01:12 +02:00
|
|
|
MESSAGE(STATUS "Judy not found. OQGraph will not be compiled")
|
2015-09-01 22:00:26 +02:00
|
|
|
SET(OQGRAPH_OK 0 CACHE INTERNAL "")
|
2013-12-11 13:02:12 +04:00
|
|
|
RETURN()
|
2012-09-30 14:49:46 -07:00
|
|
|
ENDIF()
|
2013-02-14 10:38:35 -08:00
|
|
|
INCLUDE_DIRECTORIES(${Judy_INCLUDE_DIR})
|
2019-05-09 19:12:34 +02:00
|
|
|
SET(OQGRAPH_OK 1)
|
|
|
|
ENDMACRO()
|
MDEV-6248 GUI-friendly cmake options to enable/disable plugins
* Introduce a set of PLUGIN_xxx cmake options with values
NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
doing MYSQL_ADD_PLUGIN conditionally as before. Because if
MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
2014-06-23 12:09:00 +02:00
|
|
|
|
2020-11-13 18:15:04 +11:00
|
|
|
IF(PLUGIN_OQGRAPH STREQUAL "NO")
|
|
|
|
RETURN()
|
|
|
|
ENDIF()
|
|
|
|
|
2015-09-01 22:00:26 +02:00
|
|
|
IF(NOT DEFINED OQGRAPH_OK)
|
|
|
|
CHECK_OQGRAPH()
|
2016-05-03 15:23:34 +02:00
|
|
|
IF (NOT OQGRAPH_OK)
|
|
|
|
MESSAGE(STATUS "Requisites for OQGraph not met. OQGraph will not be compiled")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF(NOT OQGRAPH_OK)
|
|
|
|
RETURN()
|
2015-09-01 22:00:26 +02:00
|
|
|
ENDIF()
|
2016-05-03 15:23:34 +02:00
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DHAVE_OQGRAPH)
|
|
|
|
IF(MSVC)
|
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
|
|
|
# Fix problem with judy not finding inttypes.h on Windows:
|
|
|
|
ADD_DEFINITIONS(-DJU_WIN)
|
|
|
|
ELSE(MSVC)
|
|
|
|
# Fix lp bug 1221555 with -fpermissive, so that errors in gcc 4.7 become warnings for the time being
|
2019-06-16 19:42:59 +02:00
|
|
|
STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
2016-05-03 20:13:58 +02:00
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing -fpermissive")
|
2016-05-03 15:23:34 +02:00
|
|
|
ENDIF(MSVC)
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DBOOST_NO_RTTI=1 -DBOOST_NO_TYPEID=1 -DBOOST_DISABLE_ASSERTS=1)
|
|
|
|
MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc graphcore-graph.cc
|
|
|
|
oqgraph_shim.cc oqgraph_thunk.cc oqgraph_judy.cc
|
|
|
|
STORAGE_ENGINE
|
|
|
|
MODULE_ONLY
|
|
|
|
RECOMPILE_FOR_EMBEDDED
|
|
|
|
COMPONENT oqgraph-engine
|
|
|
|
LINK_LIBRARIES ${Judy_LIBRARIES})
|