diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /storage/oqgraph/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-upstream/1%10.5.12.tar.xz mariadb-10.5-upstream/1%10.5.12.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/oqgraph/CMakeLists.txt')
-rw-r--r-- | storage/oqgraph/CMakeLists.txt | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt new file mode 100644 index 00000000..a41b864d --- /dev/null +++ b/storage/oqgraph/CMakeLists.txt @@ -0,0 +1,64 @@ +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +MACRO(CHECK_OQGRAPH) +MESSAGE(STATUS "Configuring OQGraph") +FIND_PACKAGE(Boost 1.40.0) +SET_PACKAGE_PROPERTIES(Boost PROPERTIES + PURPOSE "Required for the OQGraph storage engine" + TYPE OPTIONAL +) +IF(NOT Boost_FOUND) + MESSAGE(STATUS "Boost not found. OQGraph will not be compiled") + SET(OQGRAPH_OK 0 CACHE INTERNAL "") + RETURN() +ENDIF() +INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS}) + +FIND_PACKAGE(Judy) +SET_PACKAGE_PROPERTIES(Judy PROPERTIES + PURPOSE "Required for the OQGraph storage engine" + TYPE OPTIONAL +) +IF(NOT Judy_FOUND) + MESSAGE(STATUS "Judy not found. OQGraph will not be compiled") + SET(OQGRAPH_OK 0 CACHE INTERNAL "") + RETURN() +ENDIF() +INCLUDE_DIRECTORIES(${Judy_INCLUDE_DIR}) +SET(OQGRAPH_OK 1) +ENDMACRO() + +IF(PLUGIN_OQGRAPH STREQUAL "NO") + RETURN() +ENDIF() + +IF(NOT DEFINED OQGRAPH_OK) + CHECK_OQGRAPH() + IF (NOT OQGRAPH_OK) + MESSAGE(STATUS "Requisites for OQGraph not met. OQGraph will not be compiled") + ENDIF() +ENDIF() + +IF(NOT OQGRAPH_OK) + RETURN() +ENDIF() + +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 + STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing -fpermissive") +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}) |