<commit_before>cmake_minimum_required(VERSION 2.8.4)
project(RUtil2)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE "Debug")
endif()

add_definitions(-std=gnu99 -Wall)

if(${CMAKE_SYSTEM_PROCESSOR} MATCHES armv7l)
    #Make it support armv7 platform
    add_definitions(-march=armv7 -mfloat-abi=hard -mfpu=neon)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64* OR ${CMAKE_SYSTEM_NAME} MATCHES Darwin*)
    add_definitions(-march=x86-64 -mtune=generic -mtune=core2 -mtune=core-avx-i)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES i386*)
    add_definitions(-march=i686 -mtune=generic -mtune=core2 -mtune=core-avx-i)
else()
    #message(FATAL_ERROR ${CMAKE_SYSTEM_PROCESSOR}: "Your system is unsupported!")
endif()


set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
set(CMAKE_C_FLAGS_RELEASE "-Ofast -DNDEBUG")

set(CMAKE_LD_FLAGS_DEBUG "-Wl,-O0")
set(CMAKE_LD_FLAGS_RELEASE "-Wl,-O1,--as-needed,--sort-common")

enable_testing()

include(GNUInstallDirs)

# uninstall target
configure_file(
    "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
    IMMEDIATE @ONLY)
<commit_msg>Fixed Platform Detect code in CMakefiles<commit_after>cmake_minimum_required(VERSION 2.8.4)
project(RUtil2)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE "Debug")
endif()

add_definitions(-std=gnu99 -Wall)

if(${CMAKE_SYSTEM_PROCESSOR} MATCHES armv7l)
    #Make it support armv7 platform
    add_definitions(-march=armv7 -mfloat-abi=hard -mfpu=neon)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64* OR ${CMAKE_SYSTEM_NAME} MATCHES Darwin*)
    add_definitions(-march=x86-64 -mtune=generic -mtune=core2 -mtune=core-avx-i)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES i386* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES x86*)
    add_definitions(-march=i686 -mtune=generic -mtune=core2 -mtune=core-avx-i)
else()
    message(FATAL_ERROR ${CMAKE_SYSTEM_PROCESSOR}: "Your system is unsupported!")
endif()
message("-- Detected Supported Platform: " ${CMAKE_SYSTEM_PROCESSOR})

set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
set(CMAKE_C_FLAGS_RELEASE "-Ofast -DNDEBUG")

set(CMAKE_LD_FLAGS_DEBUG "-Wl,-O0")
set(CMAKE_LD_FLAGS_RELEASE "-Wl,-O1,--as-needed,--sort-common")

enable_testing()

include(GNUInstallDirs)

# uninstall target
configure_file(
    "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
    IMMEDIATE @ONLY)

{'fraction_non_alphanumeric': 0.12808460634547592, 'fraction_numerical': 0.026635330983157072, 'mean_word_length': 6.578635014836795, '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': '7410179', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1020, 'n_words': 162}