<commit_before>cmake_minimum_required(VERSION 2.8.11)

project(stadic)

if(CMAKE_COMPILER_IS_GNUCXX)
  # Apparently 4.6 is the earliest version supporting nullptr and range-based for
  # https://gcc.gnu.org/projects/cxx0x.html
  if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "4.6.0")
    message(FATAL_ERROR "g++ versions earlier than 4.6.0 are not supported")
  endif()
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(MSVC)
  # Visual Studio compiler check, totally borrowed from OpenStudio
  # http://en.wikipedia.org/wiki/Visual_C%2B%2B#32-bit_and_64-bit_versions
  if(${CMAKE_C_COMPILER_VERSION} VERSION_LESS "18.0.21005.1")
    message(FATAL_ERROR "Visual Studio earlier than VS2013 is not supported")
  endif()
  if(WIN32)
    set(Boost_USE_STATIC_LIBS ON)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
  endif()
elseif(Apple)
  # The checks to determine if the compiler is clang are all rather sketchy,
  # and maybe this should go before the g++ test above to get things right.
  # But for now skip the checks and assume everything will be Ok.
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
endif()

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

#Boost
set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/boost-root" CACHE PATH "Use local copy of Boost libraries")
find_package(Boost 1.56 COMPONENTS system filesystem REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
file(COPY boost-process/boost/process.hpp DESTINATION "${CMAKE_SOURCE_DIR}/boost-root/include/boost-1_56/boost")
file(COPY boost-process/boost/process DESTINATION "${CMAKE_SOURCE_DIR}/boost-root/include/boost-1_56/boost")

# Find includes in the build directories
#set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Turn on automatic invocation of the MOC
#set(CMAKE_AUTOMOC ON)

# Find the QtWidgets library
#find_package(Qt5Widgets REQUIRED)

add_subdirectory(lib)
add_subdirectory(utilities)

# Include the tests if gtest is found
if(EXISTS ${CMAKE_SOURCE_DIR}/gtest-1.7.0/)
  if(MSVC)
    set(gtest_force_shared_crt ON CACHE BOOL "Force gtest to use msvcrt.dll")
  endif()
  add_subdirectory(gtest-1.7.0)
  add_subdirectory(test)
else()
  message(WARNING "Failed to find gtest 1.7.0, tests will not be built")
endif()<commit_msg>Go back to external boost<commit_after>cmake_minimum_required(VERSION 2.8.11)

project(stadic)

if(CMAKE_COMPILER_IS_GNUCXX)
  # Apparently 4.6 is the earliest version supporting nullptr and range-based for
  # https://gcc.gnu.org/projects/cxx0x.html
  if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "4.6.0")
    message(FATAL_ERROR "g++ versions earlier than 4.6.0 are not supported")
  endif()
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(MSVC)
  # Visual Studio compiler check, totally borrowed from OpenStudio
  # http://en.wikipedia.org/wiki/Visual_C%2B%2B#32-bit_and_64-bit_versions
  if(${CMAKE_C_COMPILER_VERSION} VERSION_LESS "18.0.21005.1")
    message(FATAL_ERROR "Visual Studio earlier than VS2013 is not supported")
  endif()
  if(WIN32)
    set(Boost_USE_STATIC_LIBS ON)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
  endif()
elseif(Apple)
  # The checks to determine if the compiler is clang are all rather sketchy,
  # and maybe this should go before the g++ test above to get things right.
  # But for now skip the checks and assume everything will be Ok.
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
endif()

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

#Boost
find_package(Boost 1.56 COMPONENTS system filesystem REQUIRED)
include_directories(${Boost_INCLUDE_DIR})

# Find includes in the build directories
#set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Turn on automatic invocation of the MOC
#set(CMAKE_AUTOMOC ON)

# Find the QtWidgets library
#find_package(Qt5Widgets REQUIRED)

add_subdirectory(lib)
add_subdirectory(utilities)

# Include the tests if gtest is found
if(EXISTS ${CMAKE_SOURCE_DIR}/gtest-1.7.0/)
  if(MSVC)
    set(gtest_force_shared_crt ON CACHE BOOL "Force gtest to use msvcrt.dll")
  endif()
  add_subdirectory(gtest-1.7.0)
  add_subdirectory(test)
else()
  message(WARNING "Failed to find gtest 1.7.0, tests will not be built")
endif()
{'fraction_non_alphanumeric': 0.1043802423112768, 'fraction_numerical': 0.02516309412861137, 'mean_word_length': 5.5843558282208585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2586753', 'n_tokens_mistral': 1692, 'n_tokens_neox': 1543, 'n_words': 379}