<commit_before>cmake_minimum_required (VERSION 2.8)
project (benchmark)

# Make sure we can import out CMake functions
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# Import and build Google Test
include(ExternalProject)
set_directory_properties(properties EP_PREFIX "${CMAKE_BINARY_DIR}/third_party")
ExternalProject_Add(googletest
  URL "https://googletest.googlecode.com/files/gtest-1.7.0.zip"
  URL_MD5 2d6ec8ccdf5c46b05ba54a9fd1d130d7
  SOURCE_DIR "${CMAKE_BINARY_DIR}/third_party/gtest"
  CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
  INSTALL_COMMAND "")
ExternalProject_Get_Property(googletest source_dir)
include_directories(${source_dir}/include)
ExternalProject_Get_Property(googletest binary_dir)
link_directories(${binary_dir})

# Enable the latest C++ standard possible
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(--std=c++14 HAVE_FLAG_CXX_14)
check_cxx_compiler_flag(--std=c++11 HAVE_FLAG_CXX_11)
check_cxx_compiler_flag(--std=c++0x HAVE_FLAG_CXX_0X)
if (HAVE_FLAG_CXX_14)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14")
elseif (HAVE_FLAG_CXX_11)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
elseif (HAVE_FLAG_CXX_0X)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
endif()

# Turn compiler warnings up to 11
include(AddCXXCompilerFlag)
add_cxx_compiler_flag(-Wall)
add_cxx_compiler_flag(-Wshadow)
add_cxx_compiler_flag(-Werror)
add_cxx_compiler_flag(-pedantic-errors)
#add_cxx_compiler_flag(-Wzero-as-null-pointer-constant)

# Release flags
add_cxx_compiler_flag(-fno-strict-aliasing RELEASE)

# Add a debug definition so we can make decisions in the compilation
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")

# Set OS
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  add_definitions(-DOS_MACOSX)
endif()
<commit_msg>remove -Werror to enable ccache/clang usage<commit_after>cmake_minimum_required (VERSION 2.8)
project (benchmark)

# Make sure we can import out CMake functions
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# Import and build Google Test
include(ExternalProject)
set_directory_properties(properties EP_PREFIX "${CMAKE_BINARY_DIR}/third_party")
ExternalProject_Add(googletest
  URL "https://googletest.googlecode.com/files/gtest-1.7.0.zip"
  URL_MD5 2d6ec8ccdf5c46b05ba54a9fd1d130d7
  SOURCE_DIR "${CMAKE_BINARY_DIR}/third_party/gtest"
  CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
  INSTALL_COMMAND "")
ExternalProject_Get_Property(googletest source_dir)
include_directories(${source_dir}/include)
ExternalProject_Get_Property(googletest binary_dir)
link_directories(${binary_dir})

# Enable the latest C++ standard possible
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(--std=c++14 HAVE_FLAG_CXX_14)
check_cxx_compiler_flag(--std=c++11 HAVE_FLAG_CXX_11)
check_cxx_compiler_flag(--std=c++0x HAVE_FLAG_CXX_0X)
if (HAVE_FLAG_CXX_14)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14")
elseif (HAVE_FLAG_CXX_11)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
elseif (HAVE_FLAG_CXX_0X)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
endif()

# Turn compiler warnings up to 11
include(AddCXXCompilerFlag)
add_cxx_compiler_flag(-Wall)
add_cxx_compiler_flag(-Wshadow)
#add_cxx_compiler_flag(-Werror)
add_cxx_compiler_flag(-pedantic-errors)
#add_cxx_compiler_flag(-Wzero-as-null-pointer-constant)

# Release flags
add_cxx_compiler_flag(-fno-strict-aliasing RELEASE)

# Add a debug definition so we can make decisions in the compilation
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")

# Set OS
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  add_definitions(-DOS_MACOSX)
endif()

{'fraction_non_alphanumeric': 0.10795299262093468, 'fraction_numerical': 0.02405028696365127, 'mean_word_length': 8.682539682539682, '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': '710638', 'n_tokens_mistral': 1491, 'n_tokens_neox': 1366, 'n_words': 221}