<commit_before>set(TARGET redisdocstore)

add_custom_command(
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/redis_access_wrap.cxx
  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/redis_access.i
          ${CMAKE_CURRENT_SOURCE_DIR}/redis_access.hpp
  COMMAND ${SWIG_COMMAND} -c++ -javascript -jsc
          -I${jsobjects_SWIG_INCLUDE_DIRS}
          -o ${CMAKE_CURRENT_BINARY_DIR}/redis_access_wrap.cxx
          ${CMAKE_CURRENT_SOURCE_DIR}/redis_access.i
  COMMENT "Creating native wrapper for redis_access.hpp"
)

set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/redis_access_wrap.cxx PROPERTY GENERATED ON)

set(REDIS_DOCSTORE_HEADERS
  "${CMAKE_CURRENT_SOURCE_DIR}/redis_error.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/redis_access.hpp"
)

set(REDIS_DOCSTORE_SOURCES
  "${CMAKE_CURRENT_SOURCE_DIR}/redis_error.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/hiredis_access_impl.cxx"
)

include_directories(
  ${JS_INCLUDE_DIRS}
  ${Boost_INCLUDE_DIRS}
  ${jsobjects_INCLUDE_DIRS}
  ${HIREDIS_INCLUDE_DIRS}
  ${CMAKE_CURRENT_SOURCE_DIR}
)

link_directories(
  ${HIREDIS_LIB_DIRS}
  ${JS_LIBRARY_DIRS}
)

add_library(
  ${TARGET} SHARED
  ${REDIS_DOCSTORE_HEADERS}
  ${REDIS_DOCSTORE_SOURCES}
  ${CMAKE_CURRENT_BINARY_DIR}/redis_access_wrap.cxx
)

target_link_libraries(${TARGET}
  ${JS_LIBRARIES}
)

target_link_libraries(${TARGET}
  LINK_PRIVATE
  ${HIREDIS_LIBS}
)

set_target_properties(${TARGET} PROPERTIES
  OUTPUT_NAME redis
)

set (redisdocstore_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${jsobjects_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} CACHE INTERNAL "" FORCE)

export(TARGETS ${TARGET} FILE ${PROJECT_BINARY_DIR}/RedisDocStore.cmake)<commit_msg>Declare a project dependency.<commit_after>set(TARGET redisdocstore)

add_custom_command(
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/redis_access_wrap.cxx
  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/redis_access.i
          ${CMAKE_CURRENT_SOURCE_DIR}/redis_access.hpp
  COMMAND ${SWIG_COMMAND} -c++ -javascript -jsc
          -I${jsobjects_SWIG_INCLUDE_DIRS}
          -o ${CMAKE_CURRENT_BINARY_DIR}/redis_access_wrap.cxx
          ${CMAKE_CURRENT_SOURCE_DIR}/redis_access.i
  COMMENT "Creating native wrapper for redis_access.hpp"
)

set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/redis_access_wrap.cxx PROPERTY GENERATED ON)

set(REDIS_DOCSTORE_HEADERS
  "${CMAKE_CURRENT_SOURCE_DIR}/redis_error.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/redis_access.hpp"
)

set(REDIS_DOCSTORE_SOURCES
  "${CMAKE_CURRENT_SOURCE_DIR}/redis_error.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/hiredis_access_impl.cxx"
)

include_directories(
  ${JS_INCLUDE_DIRS}
  ${Boost_INCLUDE_DIRS}
  ${jsobjects_INCLUDE_DIRS}
  ${HIREDIS_INCLUDE_DIRS}
  ${CMAKE_CURRENT_SOURCE_DIR}
)

link_directories(
  ${HIREDIS_LIB_DIRS}
  ${JS_LIBRARY_DIRS}
)

add_library(
  ${TARGET} SHARED
  ${REDIS_DOCSTORE_HEADERS}
  ${REDIS_DOCSTORE_SOURCES}
  ${CMAKE_CURRENT_BINARY_DIR}/redis_access_wrap.cxx
)

add_dependencies(${TARGET} hiredis)

target_link_libraries(${TARGET}
  ${JS_LIBRARIES}
)

target_link_libraries(${TARGET}
  LINK_PRIVATE
  ${HIREDIS_LIBS}
)

set_target_properties(${TARGET} PROPERTIES
  OUTPUT_NAME redis
)

set (redisdocstore_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${jsobjects_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} CACHE INTERNAL "" FORCE)

export(TARGETS ${TARGET} FILE ${PROJECT_BINARY_DIR}/RedisDocStore.cmake)
{'fraction_non_alphanumeric': 0.106544901065449, 'fraction_numerical': 0.0, 'mean_word_length': 6.786729857819905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '904741', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1305, 'n_words': 144}