<commit_before>if(NOT DEFINED ANDROID_ABI)
    set(ANDROID_ABI "armeabi-v7a")
    message(STATUS "Possible ABI values : armeabi-v7a (default), armeabi, x86")
endif()
message(STATUS "Android ABI : ${ANDROID_ABI}") 

if(NOT DEFINED ANDROID_TARGET)
    set(ANDROID_TARGET "android-19")
endif()
message(STATUS "Android target : ${ANDROID_TARGET}")

include(${CMAKE_SOURCE_DIR}/build/toolchains/android.toolchain.cmake)

add_definitions(-DPLATFORM_ANDROID)

if(NOT MAKE_BUILD_TOOL)
    message(SEND_ERROR "Provide ndk make, located in <NDK_ROOT>/prebuilt/<OS>/bin/, -DMAKE_BUILD_TOOL=<NDK_PREBUILT_BIN>/make")
    return()
else()
    set(CMAKE_BUILD_TOOL ${MAKE_BUILD_TOOL})
    message(STATUS "Will use make prebuilt tool located at : ${CMAKE_BUILD_TOOL}")
endif()

# configurations
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -pedantic -llog -lz")
set(CXX_FLAGS_DEBUG "${CXX_FLAGS_DEBUG} -g -O0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -fPIC")
set(LIBCURL_PRECOMPILED_LIB ${CMAKE_SOURCE_DIR}/android/jni/precompiled/${ANDROID_ABI}/libcurl.a)

# include dependency headers
include_directories(${PROJECT_SOURCE_DIR}/android/jni/include)

message(STATUS "Using curl precompiled static library : ${LIBCURL_PRECOMPILED_LIB}")

# adding manually the two jni c++ files
set(ADDITIONNAL_TARGET_DEPENDENT_SRC_FILES 
     ${CMAKE_SOURCE_DIR}/android/jni/jniExports.cpp
     ${CMAKE_SOURCE_DIR}/android/jni/platform_android.cpp)<commit_msg>Fixing some build errors in Android CMake configuration; Android build is currently broken, maybe because compiler is not using the correct stdlib (should be libc++)<commit_after>if(NOT DEFINED ANDROID_ABI)
    set(ANDROID_ABI "armeabi-v7a")
    message(STATUS "Possible ABI values : armeabi-v7a (default), armeabi, x86")
endif()
message(STATUS "Android ABI : ${ANDROID_ABI}") 

if(NOT DEFINED ANDROID_TARGET)
    set(ANDROID_TARGET "android-19")
endif()
message(STATUS "Android target : ${ANDROID_TARGET}")

include(${CMAKE_SOURCE_DIR}/build/toolchains/android.toolchain.cmake)

add_definitions(-DPLATFORM_ANDROID)

if(NOT MAKE_BUILD_TOOL)
    message(SEND_ERROR "Provide ndk make, located in <NDK_ROOT>/prebuilt/<OS>/bin/, -DMAKE_BUILD_TOOL=<NDK_PREBUILT_BIN>/make")
    return()
else()
    set(CMAKE_BUILD_TOOL ${MAKE_BUILD_TOOL})
    message(STATUS "Will use make prebuilt tool located at : ${CMAKE_BUILD_TOOL}")
endif()

# configurations
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -pedantic -llog -lz")
set(CXX_FLAGS_DEBUG "${CXX_FLAGS_DEBUG} -g -O0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -fPIC")
set(LIBCURL_PRECOMPILED_LIB ${CMAKE_SOURCE_DIR}/android/jni/precompiled/${ANDROID_ABI}/libcurl.a)
set(ANDROID_STL c++_shared)

# include dependency headers
include_directories(${PROJECT_SOURCE_DIR}/android/jni/include)

message(STATUS "Using curl precompiled static library : ${LIBCURL_PRECOMPILED_LIB}")

# adding manually the two jni c++ files
set(ADDITIONNAL_TARGET_DEPENDENT_SRC_FILES 
     ${CMAKE_SOURCE_DIR}/android/jni/jniExports.cpp
     ${CMAKE_SOURCE_DIR}/android/jni/platform_android.cpp)
{'fraction_non_alphanumeric': 0.12329656067488644, 'fraction_numerical': 0.005840363400389357, 'mean_word_length': 6.537897310513447, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1053023', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1128, 'n_words': 213}