<commit_before>cmake_minimum_required(VERSION 2.8)

project(libcurl-download NONE)

find_program(MAKE_EXE NAMES make)

if (DEFINED CMAKE_OSX_SYSROOT AND NOT CMAKE_OSX_SYSROOT STREQUAL "")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isysroot${CMAKE_OSX_SYSROOT}")
endif()

include(ExternalProject)

set(BUILD_SHARED_LIBS 1)
if (BUILD_STATIC)
    set(BUILD_SHARED_LIBS 0)
endif()

set(CMAKE_ARGS
        -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
        -DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
        -DBUILD_CURL_EXE=0
        -DHTTP_ONLY=1)

# By default use openssl
if (USE_MBEDTLS)
    set(CMAKE_ARGS ${CMAKE_ARGS} -DCMAKE_USE_MBEDTLS=1 -DCURL_STATIC_CRT=1)
endif()

if (WIN32)
    set(CMAKE_ARGS ${CMAKE_ARGS} -DCMAKE_USE_WINSSL=1 -DCURL_STATIC_CRT=1)
endif()

ExternalProject_Add(project_libcurl
    GIT_REPOSITORY    https://github.com/curl/curl.git
    GIT_TAG           curl-7_68_0
    PREFIX            ${CMAKE_CURRENT_BINARY_DIR}/build
    CMAKE_ARGS        ${CMAKE_ARGS}
    BUILD_ALWAYS      TRUE
    TEST_COMMAND      "")<commit_msg>Only needed by windows. https://github.com/winlibs/cURL/blob/master/CMakeLists.txt#L78<commit_after>cmake_minimum_required(VERSION 2.8)

project(libcurl-download NONE)

find_program(MAKE_EXE NAMES make)

if (DEFINED CMAKE_OSX_SYSROOT AND NOT CMAKE_OSX_SYSROOT STREQUAL "")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isysroot${CMAKE_OSX_SYSROOT}")
endif()

include(ExternalProject)

set(BUILD_SHARED_LIBS 1)
if (BUILD_STATIC)
    set(BUILD_SHARED_LIBS 0)
endif()

set(CMAKE_ARGS
        -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
        -DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
        -DBUILD_CURL_EXE=0
        -DHTTP_ONLY=1)

# By default use openssl
if (USE_MBEDTLS)
    set(CMAKE_ARGS ${CMAKE_ARGS} -DCMAKE_USE_MBEDTLS=1)
endif()

if (WIN32)
    set(CMAKE_ARGS ${CMAKE_ARGS} -DCMAKE_USE_WINSSL=1 -DCURL_STATIC_CRT=1)
endif()

ExternalProject_Add(project_libcurl
    GIT_REPOSITORY    https://github.com/curl/curl.git
    GIT_TAG           curl-7_68_0
    PREFIX            ${CMAKE_CURRENT_BINARY_DIR}/build
    CMAKE_ARGS        ${CMAKE_ARGS}
    BUILD_ALWAYS      TRUE
    TEST_COMMAND      "")
{'fraction_non_alphanumeric': 0.09753831862517418, 'fraction_numerical': 0.015327450069670227, 'mean_word_length': 4.16546762589928, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5383042', 'n_tokens_mistral': 929, 'n_tokens_neox': 851, 'n_words': 125}