<commit_before>FIND_PACKAGE(Boost 1.45.0) # we need at least 1.45 if we want  -fno-rtti for the server
IF(NOT Boost_FOUND)
  RETURN()
ENDIF()
INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS})

# lp:756966 OQGRAPH on Win64 does not compile
IF(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
  SET(BOOST_OK 0)
ELSE()
  SET(BOOST_OK 1)
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")
    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)
ENDIF(BOOST_OK)<commit_msg>MDEV-336 oqgraph 5.5 crashes in buildbot<commit_after>FIND_PACKAGE(Boost 1.40.0)
IF(NOT Boost_FOUND)
  RETURN()
ENDIF()
INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS})

# lp:756966 OQGRAPH on Win64 does not compile
IF(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
  SET(BOOST_OK 0)
ELSE()
# 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; }
" 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")
    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)
ENDIF(BOOST_OK)
{'fraction_non_alphanumeric': 0.113218070273285, 'fraction_numerical': 0.021193530395984383, 'mean_word_length': 5.0608108108108105, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3285887', 'n_tokens_mistral': 850, 'n_tokens_neox': 741, 'n_words': 138}