<commit_before>cmake_minimum_required(VERSION 2.6)
project(DASHSource)

set(EXTERNALS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/externals)
include(ExternalProject)

set(curl_VERSION "7.42.1")
set(curl_URI http://curl.haxx.se/download/curl-${curl_VERSION}.tar.gz)
set(curl_DIR ${EXTERNALS_DIR}/curl${curl_VERSION})
set(tinyxml_DIR ${EXTERNALS_DIR}/tinyxml)

#curl libs and headers
set(curl_lib ${CMAKE_BINARY_DIR}/externals/libcurl${curl_VERSION})
set(curl_include ${curl_DIR}/include/curl)

#tinyxml2 libs and headers
set(tinyxml_lib ${CMAKE_BINARY_DIR}/externals/tinyxml)
set(tinyxml_include ${tinyxml_DIR})


#include_directories

ExternalProject_Add(
	curl-build
	URL ${curl_URI}
	SOURCE_DIR "${curl_DIR}"
	DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tarballs/curl/${curl_VERSION}"
	#CMAKE_ARGS "-DBUILD_CURL_TESTS=OFF -DBUILD_CURL_EXE=OFF -DCURL_DISABLE_LDAP=ON -DCMAKE_USE_OPENSSL=OFF -DCURL_ZLIB
	CMAKE_ARGS -DBUILD_CURL_TESTS:BOOL=OFF
				-DBUILD_CURL_EXE:BOOL=OFF
				-DCURL_DISABLE_LDAP:BOOL=ON
				-DCMAKE_USE_OPENSSL:BOOL=OFF
				-DCURL_ZLIB:BOOL=ON
				-DCMAKE_USE_LIBSSH2:BOOL=OFF
	#-DCURL_STATICLIB:BOOL=ON
	#CMAKE_CACHE_ARGS "-DBUILD_CURL_TESTS=OFF -DBUILD_CURL_EXE=OFF -DCURL_DISABLE_LDAP=ON -DCMAKE_USE_OPENSSL=OFF -DCUR
	#CMAKE_CACHE_ARGS -DBUILD_CURL_TESTS:BOOL=OFF -DBUILD_CURL_EXE:BOOL=OFF -DCURL_DISABLE_LDAP:BOOL=ON -DCMAKE_USE_OPEOPENSSL=OFF
	#CMAKE_CACHE_ARGS BUILD_CURL_TESTS:BOOL=OFF BUILD_CURL_EXE:BOOL=OFF CURL_DISABLE_LDAP:BOOL=ON CMAKE_USE_OPENSSL:BOO
# 	CONFIGURE_COMMAND ""
	#BUILD_COMMAND ""
	BINARY_DIR ${CMAKE_BINARY_DIR}/externals/libcurl${curl_VERSION}
	INSTALL_COMMAND ""
	TEST_COMMAND ""
)


ExternalProject_Add(
    tinyxml2-build
    BINARY_DIR ${CMAKE_BINARY_DIR}/externals/tinyxml
    DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tarballs/tinyxml2"
    URL https://github.com/leethomason/tinyxml2/archive/master.zip
    SOURCE_DIR ${tinyxml_DIR}
    CMAKE_ARGS ""
    INSTALL_COMMAND ""<commit_msg>[*] newest version of tinyxml2<commit_after>cmake_minimum_required(VERSION 2.6)
project(DASHSource)

set(EXTERNALS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/externals)
include(ExternalProject)

set(curl_VERSION "7.42.1")
set(tinyxml2_VERSION "3.0.0")
set(curl_URI http://curl.haxx.se/download/curl-${curl_VERSION}.tar.gz)
set(curl_local ${CMAKE_CURRENT_SOURCE_DIR}/tarballs/curl-${curl_VERSION}.tar.gz)
set(tiny_URL https://github.com/leethomason/tinyxml2/archive/${tinyxml2_VERSION}.tar.gz)
set(tiny_local ${CMAKE_CURRENT_SOURCE_DIR}/tarballs/${tinyxml2_VERSION}.tar.gz)

#source dirs
set(curl_DIR ${EXTERNALS_DIR}/curl${curl_VERSION})
set(tinyxml_DIR ${EXTERNALS_DIR}/tinyxml${tinyxml2_VERSION})
#binary dirs
set(curl_bin ${CMAKE_BINARY_DIR}/externals/libcurl${curl_VERSION})
set(tiny_bin ${CMAKE_BINARY_DIR}/externals/tinyxml${tinyxml2_VERSION})

#curl libs and headers
set(curl_lib ${curl_bin} ${curl_bin}/Debug ${curl_bin}/Release)
set(curl_include ${curl_DIR}/include/curl)

#tinyxml2 libs and headers
set(tinyxml_lib ${tiny_bin} ${tiny_bin}/Debug ${tiny_bin}/Release)
set(tinyxml_include ${tinyxml_DIR})

if(NOT EXISTS "${curl_local}")
    file(DOWNLOAD ${curl_URI} ${curl_local})
endif()
if(NOT EXISTS "${tiny_local}")
    file(DOWNLOAD ${tiny_URL} ${tiny_local})
endif()

#include_directories
#include_directories(${tiny_inc} ${curl_inc})
#link_directories(${tiny_lib} ${curl_lib})

##########################################
ExternalProject_Add(
	curl-build
	URL ${curl_local}
	SOURCE_DIR "${curl_DIR}"
	DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tarballs"
	CMAKE_ARGS -DBUILD_CURL_TESTS:BOOL=OFF
				-DBUILD_CURL_EXE:BOOL=OFF
				-DCURL_DISABLE_LDAP:BOOL=ON
				-DCMAKE_USE_OPENSSL:BOOL=OFF
				-DCURL_ZLIB:BOOL=ON
				-DCMAKE_USE_LIBSSH2:BOOL=OFF
	BINARY_DIR ${curl_bin}
	INSTALL_COMMAND ""
	TEST_COMMAND ""
)


ExternalProject_Add(
    tinyxml2-build
    BINARY_DIR ${tiny_bin}
    DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tarballs"
    URL ${tiny_local}
    SOURCE_DIR ${tinyxml_DIR}
    CMAKE_ARGS ""
    INSTALL_COMMAND ""
{'fraction_non_alphanumeric': 0.13704171934260428, 'fraction_numerical': 0.007585335018963337, 'mean_word_length': 7.489270386266094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 28}, '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': '2827253', 'n_tokens_mistral': 1685, 'n_tokens_neox': 1554, 'n_words': 191}