<commit_before>#
# The ecto kitchen macro
#

find_package(PythonInterp)

macro(init_ecto_kitchen)

  option(DESKTOP_TEST "Run tests that pop things up" OFF)

  if (CMAKE_COMPILER_IS_GNUCC)
    include(ecto/kitchen/cmake/gcc.cmake)
  endif()

  include(ecto/kitchen/cmake/fastidious.cmake)
  include(ecto/kitchen/cmake/git.cmake)

  git_status(${PROJECT_NAME})

  if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/ecto)
    MESSAGE(FATAL_ERROR "Expecting ecto as a subdirectory of your toplevel project!")
  endif()

  set(KITCHEN_PROJECTS "ecto;${ARGN}")
  if (NOT KITCHEN_PROJECTS)
    message(FATAL_ERROR no kitchen projects found?!?)
  endif()
  string(REPLACE ";" " " KITCHEN_PROJECTS_STR "${KITCHEN_PROJECTS}")
  message(STATUS "Initializing kitchen with projects ${KITCHEN_PROJECTS_STR}")

  # a hack for kitchens that aren't called ecto_kitchen
  if(NOT ecto_kitchen_SOURCE_DIR)
    set(ecto_kitchen_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
    set(ecto_kitchen_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
  endif()

  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
  enable_testing()

  foreach(proj ${KITCHEN_PROJECTS})
    list(APPEND KITCHEN_PROJECTS_SOURCE_DIRS ${ecto_kitchen_SOURCE_DIR}/${proj})
  endforeach()

  add_subdirectory(ecto/kitchen/doc ${ecto_kitchen_BINARY_DIR}/doc)

  #this sets ecto_DIR so that subsequent projects may find ecto-config.cmake
  set(ecto_DIR ${CMAKE_CURRENT_BINARY_DIR})

  foreach(proj ${KITCHEN_PROJECTS})<commit_msg>Minor patch so that sister projects may export things in config.cmake.<commit_after>#
# The ecto kitchen macro
#

find_package(PythonInterp)

macro(init_ecto_kitchen)

  option(DESKTOP_TEST "Run tests that pop things up" OFF)

  if (CMAKE_COMPILER_IS_GNUCC)
    include(ecto/kitchen/cmake/gcc.cmake)
  endif()

  include(ecto/kitchen/cmake/fastidious.cmake)
  include(ecto/kitchen/cmake/git.cmake)

  git_status(${PROJECT_NAME})

  if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/ecto)
    MESSAGE(FATAL_ERROR "Expecting ecto as a subdirectory of your toplevel project!")
  endif()

  set(KITCHEN_PROJECTS "ecto;${ARGN}")
  if (NOT KITCHEN_PROJECTS)
    message(FATAL_ERROR no kitchen projects found?!?)
  endif()
  string(REPLACE ";" " " KITCHEN_PROJECTS_STR "${KITCHEN_PROJECTS}")
  message(STATUS "Initializing kitchen with projects ${KITCHEN_PROJECTS_STR}")

  # a hack for kitchens that aren't called ecto_kitchen
  if(NOT ecto_kitchen_SOURCE_DIR)
    set(ecto_kitchen_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
    set(ecto_kitchen_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
  endif()

  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
  enable_testing()

  foreach(proj ${KITCHEN_PROJECTS})
    list(APPEND KITCHEN_PROJECTS_SOURCE_DIRS ${ecto_kitchen_SOURCE_DIR}/${proj})
  endforeach()

  add_subdirectory(ecto/kitchen/doc ${ecto_kitchen_BINARY_DIR}/doc)

  #this sets PREFIX_PATH so that kitchen projects may find *-config.cmake
  #that are generated by sister projects
  list(APPEND CMAKE_PREFIX_PATH  ${CMAKE_CURRENT_BINARY_DIR})

  foreach(proj ${KITCHEN_PROJECTS})
{'fraction_non_alphanumeric': 0.0994682514857679, 'fraction_numerical': 0.0, 'mean_word_length': 6.154362416107382, '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': '3585897', 'n_tokens_mistral': 1284, 'n_tokens_neox': 1185, 'n_words': 212}