<commit_before># Build Google Benchmark library.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "")
set(BENCHMARK_ENABLE_LTO OFF CACHE BOOL "")
add_subdirectory(benchmark)
target_compile_options(benchmark PRIVATE -O3 -DNDEBUG)

set(BENCH_SOURCES
  src/benchGeometryBuilder.cpp
  src/benchStyleContext.cpp
  src/benchTileBuilder.cpp
  src/benchTileSource.cpp
  src/template.cpp
)

# create an executable per bench
foreach(_src_file_path ${BENCH_SOURCES})
  string(REPLACE ".cpp" "" bench ${_src_file_path})
  string(REGEX MATCH "([^/]*)$" bench_name ${bench})

  set(EXECUTABLE_NAME "${bench_name}.out")

  add_executable(${EXECUTABLE_NAME} ${_src_file_path})

  target_include_directories(${EXECUTABLE_NAME}
    PRIVATE
    benchmark/include
  )

  # Use all include directories from tangram-core because tests interact with internal classes.
  target_include_directories(${EXECUTABLE_NAME} PRIVATE
    $<TARGET_PROPERTY:tangram-core,INCLUDE_DIRECTORIES>
  )

  target_link_libraries(${EXECUTABLE_NAME}
    tangram-core
    benchmark
    platform_mock
    -lpthread
  )

  set_target_properties(${EXECUTABLE_NAME}
    PROPERTIES
    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bench"
  )

  add_resources(${EXECUTABLE_NAME} "${PROJECT_SOURCE_DIR}/scenes" "res")

endforeach()
<commit_msg>whoops<commit_after># Build Google Benchmark library.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "")
set(BENCHMARK_ENABLE_LTO OFF CACHE BOOL "")
add_subdirectory(benchmark)
target_compile_options(benchmark PRIVATE -O3 -DNDEBUG)

set(BENCH_SOURCES
  src/benchGeometryBuilder.cpp
  src/benchStyleContext.cpp
  src/benchTileBuilder.cpp
  src/benchTileSource.cpp
  src/template.cpp
)

# create an executable per bench
foreach(_src_file_path ${BENCH_SOURCES})
  string(REPLACE ".cpp" "" bench ${_src_file_path})
  string(REGEX MATCH "([^/]*)$" bench_name ${bench})

  set(EXECUTABLE_NAME "${bench_name}.out")

  add_executable(${EXECUTABLE_NAME} ${_src_file_path})

  target_include_directories(${EXECUTABLE_NAME}
    PRIVATE
    benchmark/include
  )

  # Use all include directories from tangram-core because tests interact with internal classes.
  target_include_directories(${EXECUTABLE_NAME} PRIVATE
    $<TARGET_PROPERTY:tangram-core,INCLUDE_DIRECTORIES>
  )

  target_link_libraries(${EXECUTABLE_NAME}
    tangram-core
    benchmark
    platform_mock
    -lpthread
  )

  set_target_properties(${EXECUTABLE_NAME}
    PROPERTIES
    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bench"
  )

  if(TANGRAM_JSCORE_ENABLED)
    target_compile_definitions(${EXECUTABLE_NAME}
    PRIVATE
    TANGRAM_USE_JSCORE=1)
  endif()

  add_resources(${EXECUTABLE_NAME} "${PROJECT_SOURCE_DIR}/scenes" "res")

endforeach()

{'fraction_non_alphanumeric': 0.10092764378478664, 'fraction_numerical': 0.0011131725417439704, 'mean_word_length': 5.591687041564792, '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': '6497808', 'n_tokens_mistral': 979, 'n_tokens_neox': 933, 'n_words': 153}