<commit_before># -*- mode: CMAKE; -*-

project(rocksdb C CXX)

set(FAIL_ON_WARNINGS OFF CACHE BOOL "do not enable -Werror")

# jemalloc settings
if (USE_JEMALLOC)
  if (WIN32)
    set(USE_JEMALLOC_DEFAULT 1                                  CACHE BOOL "enable jemalloc")
    set(JEMALLOC_INCLUDE     ${JEMALLOC_HOME}/include           CACHE PATH "include path")
    set(JEMALLOC_LIB_DEBUG   ${JEMALLOC_HOME}/lib/libjemalloc.a CACHE FILEPATH "debug library")
    set(JEMALLOC_LIB_RELEASE ${JEMALLOC_HOME}/lib/libjemalloc.a CACHE FILEPATH "release library")
  else ()
    set(WITH_JEMALLOC        ON                                 CACHE BOOL "enable jemalloc")
    set(JEMALLOC_INCLUDE     ${JEMALLOC_HOME}/include           CACHE PATH "include path")
    set(JEMALLOC_LIB         ${JEMALLOC_HOME}/lib/libjemalloc.a CACHE PATH "library file")
    set(THIRDPARTY_LIBS      ${JEMALLOC_LIB})
  endif ()
endif ()

# snappy settings
set(USE_SNAPPY_DEFAULT 1 CACHE BOOL "enable snappy")

set(SNAPPY_HOME ${CMAKE_SOURCE_DIR}/3rdParty/snappy/google-snappy-d53de18/ )

set(SNAPPY_INCLUDE ${SNAPPY_HOME} CACHE PATH "include path")
# list(APPEND SNAPPY_INCLUDE ${CMAKE_BINARY_DIR}/3rdParty/snappy/google-snappy-d53de18/)
set(SNAPPY_LIB_DEBUG snappystatic CACHE FILEPATH "debug library")
set(SNAPPY_LIB_RELEASE snappystatic CACHE FILEPATH "release library")

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/v5.1.4)

# result

list(APPEND LINK_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/rocksdb/v5.1.4")<commit_msg>fixed compile with USE_JEMALLOC=OFF<commit_after># -*- mode: CMAKE; -*-

project(rocksdb C CXX)

set(FAIL_ON_WARNINGS OFF CACHE BOOL "do not enable -Werror")

# jemalloc settings
if (USE_JEMALLOC)
  if (WIN32)
    set(USE_JEMALLOC_DEFAULT 1                                  CACHE BOOL "enable jemalloc")
    set(JEMALLOC_INCLUDE     ${JEMALLOC_HOME}/include           CACHE PATH "include path")
    set(JEMALLOC_LIB_DEBUG   ${JEMALLOC_HOME}/lib/libjemalloc.a CACHE FILEPATH "debug library")
    set(JEMALLOC_LIB_RELEASE ${JEMALLOC_HOME}/lib/libjemalloc.a CACHE FILEPATH "release library")
  else ()
    set(WITH_JEMALLOC        ON                                 CACHE BOOL "enable jemalloc")
    set(JEMALLOC_INCLUDE     ${JEMALLOC_HOME}/include           CACHE PATH "include path")
    set(JEMALLOC_LIB         ${JEMALLOC_HOME}/lib/libjemalloc.a CACHE PATH "library file")
    set(THIRDPARTY_LIBS      ${JEMALLOC_LIB})
  endif ()
else ()
  set(WITH_JEMALLOC OFF CACHE BOOL "enable jemalloc")
endif ()

# snappy settings
set(USE_SNAPPY_DEFAULT 1 CACHE BOOL "enable snappy")

set(SNAPPY_HOME ${CMAKE_SOURCE_DIR}/3rdParty/snappy/google-snappy-d53de18/ )

set(SNAPPY_INCLUDE ${SNAPPY_HOME} CACHE PATH "include path")
# list(APPEND SNAPPY_INCLUDE ${CMAKE_BINARY_DIR}/3rdParty/snappy/google-snappy-d53de18/)
set(SNAPPY_LIB_DEBUG snappystatic CACHE FILEPATH "debug library")
set(SNAPPY_LIB_RELEASE snappystatic CACHE FILEPATH "release library")

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/v5.1.4)

# result

list(APPEND LINK_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/rocksdb/v5.1.4")
{'fraction_non_alphanumeric': 0.10117111255692908, 'fraction_numerical': 0.013012361743656473, 'mean_word_length': 3.865506329113924, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3373375', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1081, 'n_words': 215}