<commit_before>cmake_minimum_required(VERSION 2.8)
project(fluent-bit)

# Update CFLAGS
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fPIC -Wno-deprecated-declarations ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")

include(GNUInstallDirs)
include(ExternalProject)

# Output paths
set(FLB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/library")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/library")

# Fluent Bit Version
set(FLB_VERSION_MAJOR  0)
set(FLB_VERSION_MINOR 10)
set(FLB_VERSION_PATCH  0)
set(FLB_VERSION_STR "${FLB_VERSION_MAJOR}.${FLB_VERSION_MINOR}.${FLB_VERSION_PATCH}")

# Build Options
option(FLB_ALL                "Enable all features"          No)
option(FLB_DEBUG              "Build with debug symbols"     No)
option(FLB_JEMALLOC           "Build with Jemalloc support"  No)
option(FLB_TLS                "Build with SSL/TLS support"   No)
option(FLB_HTTP               "Enable build-in HTTP Server"  No)
option(FLB_WITHOUT_BIN        "Do not build executable"      No)
option(FLB_WITHOUT_EXAMPLES   "Do not build examples"        No)
option(FLB_WITHOUT_SHARED_LIB "Do not build shared library"  No)<commit_msg>build: use substr/abspath only on non-windows environment<commit_after>cmake_minimum_required(VERSION 2.8)
project(fluent-bit)

# Update CFLAGS
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fPIC -Wno-deprecated-declarations ")
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
else()
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__")
endif()

include(GNUInstallDirs)
include(ExternalProject)

# Output paths
set(FLB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/library")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/library")

# Fluent Bit Version
set(FLB_VERSION_MAJOR  0)
set(FLB_VERSION_MINOR 10)
set(FLB_VERSION_PATCH  0)
set(FLB_VERSION_STR "${FLB_VERSION_MAJOR}.${FLB_VERSION_MINOR}.${FLB_VERSION_PATCH}")

# Build Options
option(FLB_ALL                "Enable all features"          No)
option(FLB_DEBUG              "Build with debug symbols"     No)
option(FLB_JEMALLOC           "Build with Jemalloc support"  No)
option(FLB_TLS                "Build with SSL/TLS support"   No)
option(FLB_HTTP               "Enable build-in HTTP Server"  No)
option(FLB_WITHOUT_BIN        "Do not build executable"      No)
option(FLB_WITHOUT_EXAMPLES   "Do not build examples"        No)
option(FLB_WITHOUT_SHARED_LIB "Do not build shared library"  No)
{'fraction_non_alphanumeric': 0.10950704225352113, 'fraction_numerical': 0.004225352112676056, 'mean_word_length': 5.0575692963752665, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4174691', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1022, 'n_words': 188}