<commit_before># Note: GCC makes one add extra flags
if( STRICT_BUILD )
  # Do not work with Qt4: -Wzero-as-null-pointer-constant -Wuseless-cast
  # Do not work with Sobogus: -Wsign-conversion -Wold-style-cast -Weffc++
  # Do not work with SCISim: -Wfloat-equal -Wstrict-overflow=5 -Wsuggest-final-types -Wunsafe-loop-optimizations -Wsuggest-final-methods

  # Enable as many warnings as possible
  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic -Wcast-align -Wdisabled-optimization -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-include-dirs -Wnoexcept -Woverloaded-virtual -Wsign-promo -Wstrict-null-sentinel -Wtrampolines -Wundef -Wvector-operation-performance -Wconversion -Wctor-dtor-privacy -Wlogical-op -Wshadow -Wabi -Wcast-qual -Wmissing-declarations -Wredundant-decls -Werror=double-promotion" )

  # Remove warnings that the code does not pass
  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter" )
endif()

# Disable run time type information
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti" )

# Workaround for bug in CMake
if( APPLE )
  set( CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem " )
  set( CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem " )
endif()

# TODO: Benchmark optimization flags on Linux. The march=native and flto flags seem to degrade performance on OS X.
# Enable extra optimizations
#set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -flto" )

# Flags for code coverage tests
set( CMAKE_CXX_FLAGS_COVERAGE "-O0 -g --coverage" CACHE STRING "Flags used by the compiler during coverage builds." FORCE )
mark_as_advanced( CMAKE_CXX_FLAGS_COVERAGE )

# Enable sanitizers, if requested
if( SANITIZER STREQUAL "address" )
  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address" )
elseif( NOT SANITIZER STREQUAL "none" )
  message( FATAL_ERROR "Error, only 'address' is supported for GCC sanitizers, in the build system." )
endif()<commit_msg>Enabled march=native with GCC on platforms other than OS X.<commit_after># Note: GCC makes one add extra flags
if( STRICT_BUILD )
  # Do not work with Qt4: -Wzero-as-null-pointer-constant -Wuseless-cast
  # Do not work with Sobogus: -Wsign-conversion -Wold-style-cast -Weffc++
  # Do not work with SCISim: -Wfloat-equal -Wstrict-overflow=5 -Wsuggest-final-types -Wunsafe-loop-optimizations -Wsuggest-final-methods

  # Enable as many warnings as possible
  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic -Wcast-align -Wdisabled-optimization -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-include-dirs -Wnoexcept -Woverloaded-virtual -Wsign-promo -Wstrict-null-sentinel -Wtrampolines -Wundef -Wvector-operation-performance -Wconversion -Wctor-dtor-privacy -Wlogical-op -Wshadow -Wabi -Wcast-qual -Wmissing-declarations -Wredundant-decls -Werror=double-promotion" )

  # Remove warnings that the code does not pass
  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter" )
endif()

# Disable run time type information
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti" )

# Workaround for bug in CMake
if( APPLE )
  set( CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem " )
  set( CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem " )
endif()

# Enable extra optimizations; note that march=native seemds to degrade performance on OS X
if( NOT APPLE )
  set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native" )
endif()

# Flags for code coverage tests
set( CMAKE_CXX_FLAGS_COVERAGE "-O0 -g --coverage" CACHE STRING "Flags used by the compiler during coverage builds." FORCE )
mark_as_advanced( CMAKE_CXX_FLAGS_COVERAGE )

# Enable sanitizers, if requested
if( SANITIZER STREQUAL "address" )
  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address" )
elseif( NOT SANITIZER STREQUAL "none" )
  message( FATAL_ERROR "Error, only 'address' is supported for GCC sanitizers, in the build system." )
endif()
{'fraction_non_alphanumeric': 0.10173440331348693, 'fraction_numerical': 0.0020709293295366298, 'mean_word_length': 4.793103448275862, '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': '5798503', 'n_tokens_mistral': 1423, 'n_tokens_neox': 1315, 'n_words': 377}