<commit_before>#! cmake
#! Build file for the MIPS-V and MIPT-MIPS simulators
#! <NAME>
#! <EMAIL>
#! https://github.com/SoshinK

cmake_minimum_required(VERSION 3.12.5)
# cmake_minimum_required(VERSION 3.13.5) # for add_link_options

project(mipt-mips)
enable_testing()
find_package(Boost REQUIRED)

# Options
set(default_build_type "Release")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Export for Clang-Tidy
option(ENABLE_COVERAGE "Generate coverage for codecov.io" OFF)
option(ENABLE_PROFILE "Generate coverage for gprof" OFF)
option(ENABLE_IPO "Enable interprocedural optimizations" OFF)
option(ENABLE_ASAN "Enable address sanitizing in debug build" ON)
option(ENABLE_UBSAN "Enable UB sanitizing in debug build" ON)
set(GDB_SOURCE_PATH "" CACHE PATH "Path to GDB source tree")

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
  set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
      STRING "Choose the type of build." FORCE)
  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()

include(ExternalProject)
set(ELFIO_PREFIX ${CMAKE_HOME_DIRECTORY}/elfio)
ExternalProject_Add(elfio
    PREFIX ${ELFIO_PREFIX}
    GIT_REPOSITORY https://github.com/serge1/ELFIO.git
    GIT_TAG Release_3.7
    CONFIGURE_COMMAND cmake -E echo "Skipping configure step."
    BUILD_COMMAND cmake -E echo "Skipping build step."
    INSTALL_COMMAND cmake -E echo "Skipping install step."
)
include_directories(SYSTEM ${ELFIO_PREFIX}/src/elfio)

set(TESTS_CPPS
    infra/t/unit_test.cpp
    infra/cache/t/unit_test.cpp
    infra/config/t/unit_test.cpp
    infra/instrcache/t/unit_test.cpp
    infra/replacement/t/unit_test.cpp
    infra/ports/port_queue/t/unit_test.cpp
    infra/ports/t/unit_test.cpp
    infra/ports/t/example_test.cpp
    infra/ports/t/topology_test.cpp
    memory/argv_loader/t/unit_tests.cpp
    memory/cen64/t/unit_test.cpp
    memory/t/check_coherency.cpp
    memory/t/unit_test.cpp<commit_msg>Update ELFIO to version 3.8 (#1380)<commit_after>#! cmake
#! Build file for the MIPS-V and MIPT-MIPS simulators
#! <NAME>
#! <EMAIL>
#! https://github.com/SoshinK

cmake_minimum_required(VERSION 3.12.5)
# cmake_minimum_required(VERSION 3.13.5) # for add_link_options

project(mipt-mips)
enable_testing()
find_package(Boost REQUIRED)

# Options
set(default_build_type "Release")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Export for Clang-Tidy
option(ENABLE_COVERAGE "Generate coverage for codecov.io" OFF)
option(ENABLE_PROFILE "Generate coverage for gprof" OFF)
option(ENABLE_IPO "Enable interprocedural optimizations" OFF)
option(ENABLE_ASAN "Enable address sanitizing in debug build" ON)
option(ENABLE_UBSAN "Enable UB sanitizing in debug build" ON)
set(GDB_SOURCE_PATH "" CACHE PATH "Path to GDB source tree")

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
  set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
      STRING "Choose the type of build." FORCE)
  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()

include(ExternalProject)
set(ELFIO_PREFIX ${CMAKE_HOME_DIRECTORY}/elfio)
ExternalProject_Add(elfio
    PREFIX ${ELFIO_PREFIX}
    GIT_REPOSITORY https://github.com/serge1/ELFIO.git
    GIT_TAG Release_3.8
    CONFIGURE_COMMAND cmake -E echo "Skipping configure step."
    BUILD_COMMAND cmake -E echo "Skipping build step."
    INSTALL_COMMAND cmake -E echo "Skipping install step."
)
include_directories(SYSTEM ${ELFIO_PREFIX}/src/elfio)

set(TESTS_CPPS
    infra/t/unit_test.cpp
    infra/cache/t/unit_test.cpp
    infra/config/t/unit_test.cpp
    infra/instrcache/t/unit_test.cpp
    infra/replacement/t/unit_test.cpp
    infra/ports/port_queue/t/unit_test.cpp
    infra/ports/t/unit_test.cpp
    infra/ports/t/example_test.cpp
    infra/ports/t/topology_test.cpp
    memory/argv_loader/t/unit_tests.cpp
    memory/cen64/t/unit_test.cpp
    memory/t/check_coherency.cpp
    memory/t/unit_test.cpp
{'fraction_non_alphanumeric': 0.09847365829640571, 'fraction_numerical': 0.007877892663712457, 'mean_word_length': 5.001477104874446, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '5291252', 'n_tokens_mistral': 1511, 'n_tokens_neox': 1449, 'n_words': 306}