<commit_before># convenience variable for IDL's default install directories
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
  set(_IDL_PROGRAM_FILES_DIR "C:/Program Files/ITT/IDL")
  set(_IDL_NAME "IDL")
  set(_IDL_OS "")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
  set(_IDL_PROGRAM_FILES_DIR "/Applications/itt/idl")
  set(_IDL_NAME "idl")
  set(_IDL_OS ".darwin")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
  set(_IDL_PROGRAM_FILES_DIR "/usr/local/itt/idl")
  set(_IDL_NAME "idl")
  set(_IDL_OS ".linux")
endif ()

# find IDL based on version numbers; if you want a specific one, set
# it prior to running configure
if (NOT DEFINED IDL_FIND_VERSION)
  set(_IDL_KNOWN_VERSIONS "81" "80" "71" "706")

  set(_IDL_SEARCH_DIRS "${_IDL_PROGRAM_FILES_DIR}/${_IDL_NAME}")
  foreach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
    list(APPEND _IDL_SEARCH_DIRS
         "${_IDL_PROGRAM_FILES_DIR}/${_IDL_NAME}${_IDL_KNOWN_VERSION}")
  endforeach ()
endif ()

find_path(IDL_INCLUDE_DIR
  idl_export.h
  PATHS ${_IDL_SEARCH_DIRS}
  HINTS ${IDL_ROOT}
  PATH_SUFFIXES external/include
  )

find_library(IDL_LIBRARY
  NAMES idl
  PATHS ${_IDL_SEARCH_DIRS}
  HINTS ${IDL_ROOT}
  PATH_SUFFIXES /bin/bin${_IDL_OS}.x86_64 /bin/bin${_IDL_OS}.x86 /bin/bin${_IDL_OS}.i386
  )

if (IDL_INCLUDE_DIR AND IDL_LIBRARY)
   set(IDL_FOUND TRUE)
endif ()

if (IDL_FOUND)
  if (NOT IDL_FIND_QUIETLY)
    message(STATUS "IDL library: ${IDL_LIBRARY}")
    message(STATUS "IDL include: ${IDL_INCLUDE_DIR}")<commit_msg>Fixes to find IDL in pre-IDL 8.0 directory scheme as well.<commit_after># convenience variable for IDL's default install directories
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
  set(_IDL_PROGRAM_FILES_DIR "C:/Program Files/ITT/IDL")
  set(_IDL_NAME "IDL")
  set(_IDL_OS "")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
  set(_IDL_PROGRAM_FILES_DIR "/Applications/itt/idl")
  set(_IDL_NAME "idl")
  set(_IDL_OS ".darwin")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
  set(_IDL_PROGRAM_FILES_DIR "/usr/local/itt/idl")
  set(_IDL_NAME "idl")
  set(_IDL_OS ".linux")
endif ()

# find IDL based on version numbers; if you want a specific one, set
# it prior to running configure
if (NOT DEFINED IDL_FIND_VERSION)
  set(_IDL_KNOWN_VERSIONS "81" "80" "71" "706")

  set(_IDL_SEARCH_DIRS "${_IDL_PROGRAM_FILES_DIR}")
  foreach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
    list(APPEND _IDL_SEARCH_DIRS
         "${_IDL_PROGRAM_FILES_DIR}${_IDL_KNOWN_VERSION}")
  endforeach ()

  list(APPEND _IDL_SEARCH_DIRS "${_IDL_PROGRAM_FILES_DIR}/${_IDL_NAME}")
  foreach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
    list(APPEND _IDL_SEARCH_DIRS
         "${_IDL_PROGRAM_FILES_DIR}/${_IDL_NAME}${_IDL_KNOWN_VERSION}")
  endforeach ()
endif ()

find_path(IDL_INCLUDE_DIR
  idl_export.h
  PATHS ${_IDL_SEARCH_DIRS}
  HINTS ${IDL_ROOT}
  PATH_SUFFIXES external/include
  )

find_library(IDL_LIBRARY
  NAMES idl
  PATHS ${_IDL_SEARCH_DIRS}
  HINTS ${IDL_ROOT}
  PATH_SUFFIXES /bin/bin${_IDL_OS}.x86_64 /bin/bin${_IDL_OS}.x86 /bin/bin${_IDL_OS}.i386
  )

if (IDL_INCLUDE_DIR AND IDL_LIBRARY)
   set(IDL_FOUND TRUE)
endif ()

if (IDL_FOUND)
  if (NOT IDL_FIND_QUIETLY)
    message(STATUS "IDL library: ${IDL_LIBRARY}")
    message(STATUS "IDL include: ${IDL_INCLUDE_DIR}")
{'fraction_non_alphanumeric': 0.11966604823747681, 'fraction_numerical': 0.011750154607297465, 'mean_word_length': 5.509054325955734, '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': '1177571', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1360, 'n_words': 249}