<commit_before>###### HEXT-RUBY ###############################################################
PROJECT(hext-ruby)

CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR)

SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../../cmake")

# Set required C++ standard or abort.
INCLUDE(HextForceCppStd)

# If build type was not specified, build Release.
INCLUDE(HextDefaultBuildRelease)


###### DEPENDENCIES ############################################################

### SWIG
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})

### RUBY
FIND_PACKAGE(Ruby REQUIRED)

### LIBHEXT
FIND_PACKAGE(Hext REQUIRED)
INCLUDE_DIRECTORIES(${HEXT_INCLUDE_DIR})

### WRAPPERS
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/..")


###### SWIG ####################################################################
SET(CMAKE_SWIG_FLAGS "-c++")


###### RUBY ####################################################################
INCLUDE_DIRECTORIES(SYSTEM ${RUBY_INCLUDE_DIRS})

SET_SOURCE_FILES_PROPERTIES(
  "${PROJECT_SOURCE_DIR}/rbhext.i" PROPERTIES CPLUSPLUS ON)
SWIG_ADD_MODULE(
  rbhext ruby
  "${PROJECT_SOURCE_DIR}/rbhext.i"
  "${PROJECT_SOURCE_DIR}/../wrapper/Html.cpp"
  "${PROJECT_SOURCE_DIR}/../wrapper/Rule.cpp")
SWIG_LINK_LIBRARIES(rbhext ${HEXT_LIBRARY} ${RUBY_LIBRARY})
SET_TARGET_PROPERTIES(rbhext PROPERTIES OUTPUT_NAME "hext")
<commit_msg>libhext/bindings/ruby: cmake: set policy CMP0078 to new to disable deprecation warning<commit_after>###### HEXT-RUBY ###############################################################
PROJECT(hext-ruby)

CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR)

SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../../cmake")

# Set required C++ standard or abort.
INCLUDE(HextForceCppStd)

# If build type was not specified, build Release.
INCLUDE(HextDefaultBuildRelease)


###### DEPENDENCIES ############################################################

### SWIG
IF(POLICY CMP0078)
  # https://cmake.org/cmake/help/latest/policy/CMP0078.html
  CMAKE_POLICY(SET CMP0078 NEW)
ENDIF(POLICY CMP0078)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})

### RUBY
FIND_PACKAGE(Ruby REQUIRED)

### LIBHEXT
FIND_PACKAGE(Hext REQUIRED)
INCLUDE_DIRECTORIES(${HEXT_INCLUDE_DIR})

### WRAPPERS
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/..")


###### SWIG ####################################################################
SET(CMAKE_SWIG_FLAGS "-c++")


###### RUBY ####################################################################
INCLUDE_DIRECTORIES(SYSTEM ${RUBY_INCLUDE_DIRS})

SET_SOURCE_FILES_PROPERTIES(
  "${PROJECT_SOURCE_DIR}/rbhext.i" PROPERTIES CPLUSPLUS ON)
SWIG_ADD_MODULE(
  rbhext ruby
  "${PROJECT_SOURCE_DIR}/rbhext.i"
  "${PROJECT_SOURCE_DIR}/../wrapper/Html.cpp"
  "${PROJECT_SOURCE_DIR}/../wrapper/Rule.cpp")
SWIG_LINK_LIBRARIES(rbhext ${HEXT_LIBRARY} ${RUBY_LIBRARY})
SET_TARGET_PROPERTIES(rbhext PROPERTIES OUTPUT_NAME "hext")

{'fraction_non_alphanumeric': 0.30272346368715086, 'fraction_numerical': 0.008379888268156424, 'mean_word_length': 8.39344262295082, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '1867734', 'n_tokens_mistral': 1071, 'n_tokens_neox': 968, 'n_words': 142}