<commit_before># File: FindEO.cmake
# CMAKE commands to actually use the EO library
# Version: 0.0.1
#
# The following variables are filled out:
# - EO_INCLUDE_DIRS
# - EO_LIBRARY_DIRS
# - EO_LIBRARIES
# - EO_FOUND
#
# Here are the components:
# - PyEO
# - es
# - ga
# - cma
# - mpi
# - serial
#
# You can use FIND_PACKAGE( EO COMPONENTS ... ) to enable one or several components.
#

# Default enabled components
SET(EO_LIBRARIES_TO_FIND eo_shared eoutils_shared)

# Use FIND_PACKAGE( EO COMPONENTS ... ) to enable modules
IF(EO_FIND_COMPONENTS)
  FOREACH(component ${EO_FIND_COMPONENTS})
    STRING(TOUPPER ${component} _COMPONENT)
    SET(EO_USE_${_COMPONENT} 1)
  ENDFOREACH(component)

  # To make sure we don't use PyEO, ES, GA, CMA, MPI, SERIAL when there arent in COMPONENTS
  IF(NOT EO_USE_PYEO)
    SET(EO_DONT_USE_PYEO 1)
  ELSE(NOT EO_USE_PYEO)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} PyEO_shared)
  ENDIF(NOT EO_USE_PYEO)

  IF(NOT EO_USE_ES)
    SET(EO_DONT_USE_ES 1)
  ELSE(NOT EO_USE_ES)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} es_shared)
  ENDIF(NOT EO_USE_ES)

  IF(NOT EO_USE_GA)
    SET(EO_DONT_USE_GA 1)
  ELSE(NOT EO_USE_GA)
    SET(EO_LIBRARIES_TO_FIND ga_shared ${EO_LIBRARIES_TO_FIND})
  ENDIF(NOT EO_USE_GA)

  IF(NOT EO_USE_CMA)
    SET(EO_DONT_USE_CMA 1)
  ELSE(NOT EO_USE_CMA)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma_shared)
  ENDIF(NOT EO_USE_CMA)

  IF(NOT EO_USE_MPI)
    SET(EO_DONT_USE_MPI 1)
  ELSE(NOT EO_USE_MPI)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eompi_shared)
  ENDIF(NOT EO_USE_MPI)

  IF(NOT EO_USE_SERIAL)
    SET(EO_DONT_USE_SERIAL 1)
  ELSE(NOT EO_USE_SERIAL)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eoserial_shared)
  ENDIF(NOT EO_USE_SERIAL)
ENDIF(EO_FIND_COMPONENTS)

IF(NOT EO_INCLUDE_DIRS)
  FIND_PATH(
    EO_INCLUDE_DIRS
    EO.h
    PATHS
    /usr/include/eo
    /usr/local/include/eo
    )
ENDIF(NOT EO_INCLUDE_DIRS)

IF(NOT EO_LIBRARY_DIRS)
  FIND_PATH(
    EO_LIBRARY_DIRS
    libeo.a
    PATHS
    /usr/lib
    /usr/local/lib
    )
ENDIF(NOT EO_LIBRARY_DIRS)

IF(NOT EO_LIBRARIES)
  SET(EO_LIBRARIES)
  FOREACH(component ${EO_LIBRARIES_TO_FIND})
    FIND_LIBRARY(
      EO_${component}_LIBRARY
      NAMES ${component}
      PATHS
      /usr/lib
      /usr/local/lib
      )
    IF(EO_${component}_LIBRARY)
      SET(EO_LIBRARIES ${EO_LIBRARIES} ${EO_${component}_LIBRARY})
    ELSE(EO_${component}_LIBRARY)
      MESSAGE(FATAL_ERROR "${component} component not found.")
    ENDIF(EO_${component}_LIBRARY)
  ENDFOREACH(component)
ENDIF(NOT EO_LIBRARIES)

# handle the QUIETLY and REQUIRED arguments and set EO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EO
  REQUIRED_VARS EO_INCLUDE_DIRS EO_LIBRARY_DIRS EO_LIBRARIES
  )<commit_msg>* FindEO.cmake: added a few variable for more flexibility<commit_after># File: FindEO.cmake
# CMAKE commands to actually use the EO library
# Version: 0.0.1
#
# The following variables are filled out:
# - EO_INCLUDE_DIRS
# - EO_LIBRARY_DIRS
# - EO_LIBRARIES
# - EO_FOUND
#
# Here are the components:
# - PyEO
# - es
# - ga
# - cma
# - mpi
# - serial
#
# You can use FIND_PACKAGE( EO COMPONENTS ... ) to enable one or several components.
#

# Default enabled components
SET(EO_LIBRARIES_TO_FIND eo_shared eoutils_shared)

# Default include search dirs
SET(_EO_INCLUDE_SEARCH_DIRS
  /usr/include/eo
  /usr/local/include/eo
  )

# Default library search dirs
SET(_EO_LIBRARY_SEARCH_DIRS
  /usr/lib
  /usr/local/lib
  )

# Default library suffix
SET(_EO_FIND_LIBRARY_SUFFIX "_shared")

IF(EO_USE_STATIC_LIBS)
  SET(_EO_FIND_LIBRARY_SUFFIX "")
ENDIF()

# prepend EO_INCLUDEDIR to search path if specified
IF( EO_INCLUDEDIR )
  FILE(TO_CMAKE_PATH ${EO_INCLUDEDIR} EO_INCLUDEDIR)
  SET(_EO_INCLUDE_SEARCH_DIRS ${EO_INCLUDEDIR} ${_EO_INCLUDE_SEARCH_DIRS})
ENDIF()

# prepend EO_LIBRARYDIR to search path if specified
IF( EO_LIBRARYDIR )
  FILE(TO_CMAKE_PATH ${EO_LIBRARYDIR} EO_LIBRARYDIR)
  SET(_EO_LIBRARY_SEARCH_DIRS ${EO_LIBRARYDIR} ${_EO_LIBRARY_SEARCH_DIRS})
ENDIF()

# Use FIND_PACKAGE( EO COMPONENTS ... ) to enable modules
IF(EO_FIND_COMPONENTS)
  FOREACH(component ${EO_FIND_COMPONENTS})
    STRING(TOUPPER ${component} _COMPONENT)
    SET(EO_USE_${_COMPONENT} 1)
  ENDFOREACH(component)

  # To make sure we don't use PyEO, ES, GA, CMA, MPI, SERIAL when there arent in COMPONENTS
  IF(NOT EO_USE_PYEO)
    SET(EO_DONT_USE_PYEO 1)
  ELSE(NOT EO_USE_PYEO)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} PyEO${_EO_FIND_LIBRARY_SUFFIX})
  ENDIF(NOT EO_USE_PYEO)

  IF(NOT EO_USE_ES)
    SET(EO_DONT_USE_ES 1)
  ELSE(NOT EO_USE_ES)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} es${_EO_FIND_LIBRARY_SUFFIX})
  ENDIF(NOT EO_USE_ES)

  IF(NOT EO_USE_GA)
    SET(EO_DONT_USE_GA 1)
  ELSE(NOT EO_USE_GA)
    SET(EO_LIBRARIES_TO_FIND ga${_EO_FIND_LIBRARY_SUFFIX} ${EO_LIBRARIES_TO_FIND})
  ENDIF(NOT EO_USE_GA)

  IF(NOT EO_USE_CMA)
    SET(EO_DONT_USE_CMA 1)
  ELSE(NOT EO_USE_CMA)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma${_EO_FIND_LIBRARY_SUFFIX})
  ENDIF(NOT EO_USE_CMA)

  IF(NOT EO_USE_MPI)
    SET(EO_DONT_USE_MPI 1)
  ELSE(NOT EO_USE_MPI)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eompi${_EO_FIND_LIBRARY_SUFFIX})
  ENDIF(NOT EO_USE_MPI)

  IF(NOT EO_USE_SERIAL)
    SET(EO_DONT_USE_SERIAL 1)
  ELSE(NOT EO_USE_SERIAL)
    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eoserial${_EO_FIND_LIBRARY_SUFFIX})
  ENDIF(NOT EO_USE_SERIAL)
ENDIF(EO_FIND_COMPONENTS)

IF(NOT EO_INCLUDE_DIRS)
  FIND_PATH(
    EO_INCLUDE_DIRS
    EO.h
    PATHS
    ${_EO_INCLUDE_SEARCH_DIRS}
    )
ENDIF(NOT EO_INCLUDE_DIRS)

IF(NOT EO_LIBRARY_DIRS)
  FIND_PATH(
    EO_LIBRARY_DIRS
    libeo.a
    PATHS
    ${_EO_LIBRARY_SEARCH_DIRS}
    )
ENDIF(NOT EO_LIBRARY_DIRS)

IF(NOT EO_LIBRARIES)
  SET(EO_LIBRARIES)
  FOREACH(component ${EO_LIBRARIES_TO_FIND})
    FIND_LIBRARY(
      EO_${component}_LIBRARY
      NAMES ${component}
      PATHS
      ${_EO_LIBRARY_SEARCH_DIRS}
      )
    IF(EO_${component}_LIBRARY)
      SET(EO_LIBRARIES ${EO_LIBRARIES} ${EO_${component}_LIBRARY})
    ELSE(EO_${component}_LIBRARY)
      MESSAGE(FATAL_ERROR "${component} component not found.")
    ENDIF(EO_${component}_LIBRARY)
  ENDFOREACH(component)
ENDIF(NOT EO_LIBRARIES)

# handle the QUIETLY and REQUIRED arguments and set EO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EO
  REQUIRED_VARS EO_INCLUDE_DIRS EO_LIBRARY_DIRS EO_LIBRARIES
  )
{'fraction_non_alphanumeric': 0.08992154496077248, 'fraction_numerical': 0.0030175015087507543, 'mean_word_length': 4.724525043177893, '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': '4301753', 'n_tokens_mistral': 3123, 'n_tokens_neox': 3012, 'n_words': 499}