<commit_before># ----------------------------------------------------------------------------
#  Root CMake file for the elm project
# ----------------------------------------------------------------------------

cmake_minimum_required(VERSION 2.8.7)

# ----------------------------------------------------------------------------
# Define root variables
# ----------------------------------------------------------------------------
set(ROOT_PROJECT elm)
project(${ROOT_PROJECT})
set(${ROOT_PROJECT}_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/modules) # enforce includes to start with project's parent dir (e.g. #include <elm/core/core.h>)
set(${ROOT_PROJECT}_LIBS    "")
set(${ROOT_PROJECT}_MODULES "")

# ----------------------------------------------------------------------------
# Set default behavior
# ----------------------------------------------------------------------------
set(BUILD_TESTS ON CACHE BOOL "Whether to build test projects.")
set(WITH_TEST_COVERAGE OFF CACHE BOOL "Whether to produce test coverage reports.")
set(FORCE_IN_SOURCE OFF CACHE BOOL "Whether to force allow in-source builds.")

include(cmake/CompilerUtils.cmake)
if(WITH_TEST_COVERAGE)
    include(cmake/CodeCoverage.cmake)
endif(WITH_TEST_COVERAGE)
include(cmake/FileSystemUtils.cmake)
include(cmake/ListUtils.cmake)
include(cmake/MessageUtils.cmake)

# ----------------------------------------------------------------------------
# Set global CMake variables
# ----------------------------------------------------------------------------
if(NOT DEFINED CMAKE_BUILD_TYPE OR NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
    status("Since no build type was specified falling back on ${CMAKE_BUILD_TYPE} as the default build type.")
endif()

# Print all warnings and enable C++11 support
if(WIN32) # gtest on windows (MinGW) doesn't do well with C++11
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++0x")
else(WIN32)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
endif(WIN32)

# -fPIC
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
# position indepdendent code for CMake older 2.8.9
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.8")
    if(${CMAKE_PATCH_VERSION} LESS 9)
        if(LINUX)
            set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-fPIC")
        endif(LINUX)
    endif(${CMAKE_PATCH_VERSION} LESS 9)
endif()

set(CMAKE_VERBOSE ON CACHE BOOL "Verbose mode")
<commit_msg>gnu++0x for win32 and not msvc<commit_after># ----------------------------------------------------------------------------
#  Root CMake file for the elm project
# ----------------------------------------------------------------------------

cmake_minimum_required(VERSION 2.8.7)

# ----------------------------------------------------------------------------
# Define root variables
# ----------------------------------------------------------------------------
set(ROOT_PROJECT elm)
project(${ROOT_PROJECT})
set(${ROOT_PROJECT}_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/modules) # enforce includes to start with project's parent dir (e.g. #include <elm/core/core.h>)
set(${ROOT_PROJECT}_LIBS    "")
set(${ROOT_PROJECT}_MODULES "")

# ----------------------------------------------------------------------------
# Set default behavior
# ----------------------------------------------------------------------------
set(BUILD_TESTS ON CACHE BOOL "Whether to build test projects.")
set(WITH_TEST_COVERAGE OFF CACHE BOOL "Whether to produce test coverage reports.")
set(FORCE_IN_SOURCE OFF CACHE BOOL "Whether to force allow in-source builds.")

include(cmake/CompilerUtils.cmake)
if(WITH_TEST_COVERAGE)
    include(cmake/CodeCoverage.cmake)
endif(WITH_TEST_COVERAGE)
include(cmake/FileSystemUtils.cmake)
include(cmake/ListUtils.cmake)
include(cmake/MessageUtils.cmake)

# ----------------------------------------------------------------------------
# Set global CMake variables
# ----------------------------------------------------------------------------
if(NOT DEFINED CMAKE_BUILD_TYPE OR NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
    status("Since no build type was specified falling back on ${CMAKE_BUILD_TYPE} as the default build type.")
endif()

# Print all warnings and enable C++11 support
if(WIN32 AND NOT MSVC) # gtest on windows (MinGW) doesn't do well with C++11
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++0x")
else(WIN32 AND NOT MSVC)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
endif(WIN32 AND NOT MSVC)

# -fPIC
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
# position indepdendent code for CMake older 2.8.9
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.8")
    if(${CMAKE_PATCH_VERSION} LESS 9)
        if(LINUX)
            set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-fPIC")
        endif(LINUX)
    endif(${CMAKE_PATCH_VERSION} LESS 9)
endif()

set(CMAKE_VERBOSE ON CACHE BOOL "Verbose mode")

{'fraction_non_alphanumeric': 0.3296881328473066, 'fraction_numerical': 0.009518023491292021, 'mean_word_length': 1.7332595462091864, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '175316', 'n_tokens_mistral': 1447, 'n_tokens_neox': 1355, 'n_words': 336}