<commit_before>INCLUDE(CMakeForceCompiler)

SET(CMAKE_SYSTEM_NAME Linux)

SET(PLATFORM_NDK_PATH "$ENV{ANDROID_NDK_ROOT}/platforms/android-8")
SET(PLATFORM_SDK_PATH "$ENV{ANDROID_SDK_ROOT}/platforms/android-8")

SET(PLATFORM_NAME windows)

CMAKE_FORCE_C_COMPILER("$ENV{ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/${PLATFORM_NAME}/bin/arm-linux-androideabi-gcc.exe" GNU)
CMAKE_FORCE_CXX_COMPILER("$ENV{ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/${PLATFORM_NAME}/bin/arm-linux-androideabi-g++.exe" GNU)

SET(CMAKE_FIND_ROOT_PATH "$ENV{ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/${PLATFORM_NAME}")

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

INCLUDE_DIRECTORIES(${PLATFORM_NDK_PATH}/arch-arm/usr/include)

SET(CMAKE_SHARED_LINKER_FLAGS
-Wl,--no-undefined
)<commit_msg>updated Android toolchain to work also under Linux<commit_after>INCLUDE(CMakeForceCompiler)

SET(CMAKE_SYSTEM_NAME Linux)

SET(PLATFORM_NDK_PATH "$ENV{ANDROID_NDK_ROOT}/platforms/android-8")
SET(PLATFORM_SDK_PATH "$ENV{ANDROID_SDK_ROOT}/platforms/android-8")

IF (CMAKE_HOST_UNIX)
SET(PLATFORM_NAME linux-x86)
ELSE()
SET(PLATFORM_NAME windows)
SET(EXE_SUFFIX .exe)
ENDIF()

CMAKE_FORCE_C_COMPILER("$ENV{ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/${PLATFORM_NAME}/bin/arm-linux-androideabi-gcc${EXE_SUFFIX}" GNU)
CMAKE_FORCE_CXX_COMPILER("$ENV{ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/${PLATFORM_NAME}/bin/arm-linux-androideabi-g++${EXE_SUFFIX}" GNU)

SET(CMAKE_FIND_ROOT_PATH "$ENV{ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/${PLATFORM_NAME}")

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

INCLUDE_DIRECTORIES(
${PLATFORM_NDK_PATH}/arch-arm/usr/include
$ENV{ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/include
$ENV{ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include
)

SET(LINK_DIR ${PLATFORM_NDK_PATH}/arch-arm/usr/lib) 
SET(CMAKE_SHARED_LINKER_FLAGS
"-Wl,--no-undefined --sysroot=${PLATFORM_NDK_PATH}/arch-arm -L${LINK_DIR} -L$ENV{ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/libs/armeabi -lgnustl_shared"
)
{'fraction_non_alphanumeric': 0.13875598086124402, 'fraction_numerical': 0.010439321444106133, 'mean_word_length': 9.13215859030837, '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': '4606361', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1003, 'n_words': 72}