<commit_before>set(SQLITE3_INSTALL_DIR ${CMAKE_THIRD_PARTY_DIR})

message(STATUS "Building sqlite3 since sqlite3 was not found")

set(_byproducts
  ${SQLITE3_INSTALL_DIR}/lib/libsqlite3.lib
  ${SQLITE3_INSTALL_DIR}/lib/libsqlite3.so
  ${SQLITE3_INSTALL_DIR}/lib/libsqlite3.a
)

if(WIN32 OR MINGW)
  if(MINGW)
    ExternalProject_Add(
      sqlite3
      URL https://sqlite.org/2019/sqlite-autoconf-3270200.tar.gz
      URL_HASH SHA1=5f5750e3f39b7b60394a2fb6ddb2371f848670e6
      CONFIGURE_COMMAND ""
      BUILD_COMMAND gcc -shared sqlite3.c -o ${SQLITE3_INSTALL_DIR}/lib/libsqlite3.a
      BUILD_IN_SOURCE true
      BUILD_BYPRODUCTS ${_byproducts}
      INSTALL_COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src" "<INSTALL_DIR>/include/" "*.h"
      INSTALL_DIR ${SQLITE3_INSTALL_DIR}
    )
  else()
    ExternalProject_Add(
      sqlite3
      URL https://sqlite.org/2019/sqlite-amalgamation-3270200.zip
      URL_HASH SHA1=0bafa4f52c19b8a917ad31048d22787d2e25be68
      CONFIGURE_COMMAND ""
      BUILD_COMMAND cl sqlite3.c -link -dll -out:${SQLITE3_INSTALL_DIR}/lib/libsqlite3.lib
      BUILD_IN_SOURCE true
      BUILD_BYPRODUCTS ${_byproducts}
      INSTALL_COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>" "<INSTALL_DIR>/include/" "*.h"
      INSTALL_DIR ${SQLITE3_INSTALL_DIR}
    )
  endif()<commit_msg>Fix issue where windows would build sqlite3 as a DLL instead of a static lib<commit_after>set(SQLITE3_INSTALL_DIR ${CMAKE_THIRD_PARTY_DIR})

message(STATUS "Building sqlite3 since sqlite3 was not found")

set(_byproducts
  ${SQLITE3_INSTALL_DIR}/lib/libsqlite3.lib
  ${SQLITE3_INSTALL_DIR}/lib/libsqlite3.so
  ${SQLITE3_INSTALL_DIR}/lib/libsqlite3.a
)

if(WIN32 OR MINGW)
  if(MINGW)
    ExternalProject_Add(
      sqlite3
      URL https://sqlite.org/2019/sqlite-autoconf-3270200.tar.gz
      URL_HASH SHA1=5f5750e3f39b7b60394a2fb6ddb2371f848670e6
      CONFIGURE_COMMAND ""
      BUILD_COMMAND gcc -shared sqlite3.c -o ${SQLITE3_INSTALL_DIR}/lib/libsqlite3.a
      BUILD_IN_SOURCE true
      BUILD_BYPRODUCTS ${_byproducts}
      INSTALL_COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src" "<INSTALL_DIR>/include/" "*.h"
      INSTALL_DIR ${SQLITE3_INSTALL_DIR}
    )
  else()
    ExternalProject_Add(
      sqlite3
      URL https://sqlite.org/2019/sqlite-amalgamation-3270200.zip
      URL_HASH SHA1=0bafa4f52c19b8a917ad31048d22787d2e25be68
      CONFIGURE_COMMAND ""
      BUILD_COMMAND cl /c /EHsc sqlite3.c && lib sqlite3.obj /OUT:${SQLITE3_INSTALL_DIR}/lib/libsqlite3.lib
      BUILD_IN_SOURCE true
      BUILD_BYPRODUCTS ${_byproducts}
      INSTALL_COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>" "<INSTALL_DIR>/include/" "*.h"
      INSTALL_DIR ${SQLITE3_INSTALL_DIR}
    )
  endif()
{'fraction_non_alphanumeric': 0.10313411078717201, 'fraction_numerical': 0.07142857142857142, 'mean_word_length': 4.073937153419593, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, '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': '7638494', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1050, 'n_words': 151}