<commit_before># Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause

include(ExternalProject)

option(INTEL_HEXL_PREBUILT OFF) # Set to ON/OFF to use prebuilt installation
message(STATUS "INTEL_HEXL_PREBUILT ${INTEL_HEXL_PREBUILT}")

if (INTEL_HEXL_PREBUILT)  # Skip download from gitlab
  find_package(HEXL 1.2.1
        HINTS ${INTEL_HEXL_HINT_DIR}
        REQUIRED)
  if (NOT TARGET HEXL::hexl)
      FATAL_ERROR("Intel HEXL not found")
  endif()

  get_target_property(INTEL_HEXL_INCLUDE_DIR HEXL::hexl INTERFACE_INCLUDE_DIRECTORIES)
  message(STATUS "INTEL_HEXL_INCLUDE_DIR: ${INTEL_HEXL_INCLUDE_DIR}")

  get_target_property(INTEL_HEXL_LOCATION HEXL::hexl LOCATION)
  message(STATUS "INTEL_HEXL_LOCATION: ${INTEL_HEXL_LOCATION}")

  # TODO(fboemer): Use target_include_directories
  include_directories(${INTEL_HEXL_INCLUDE_DIR})

  install(FILES ${INTEL_HEXL_LOCATION}
        DESTINATION ${INSTALL_LIB_DIR}/)

else()
    # ------------------------------------------------------------------------------
    # Download and install Intel HEXL ...
    # ------------------------------------------------------------------------------
    set(INTEL_HEXL_GIT_REPO_URL https://github.com/intel/hexl)
    set(INTEL_HEXL_GIT_LABEL 1.2.1)
<commit_msg>Fboemer/fix issue 59<commit_after># Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause

include(ExternalProject)

option(INTEL_HEXL_PREBUILT OFF) # Set to ON/OFF to use prebuilt installation
message(STATUS "INTEL_HEXL_PREBUILT ${INTEL_HEXL_PREBUILT}")

if (INTEL_HEXL_PREBUILT)  # Skip download from gitlab
  find_package(HEXL 1.2.1
        HINTS ${INTEL_HEXL_HINT_DIR}
        REQUIRED)
  if (NOT TARGET HEXL::hexl)
    message(FATAL_ERROR, "Intel HEXL not found")
  endif()

  get_target_property(INTEL_HEXL_INCLUDE_DIR HEXL::hexl INTERFACE_INCLUDE_DIRECTORIES)
  message(STATUS "INTEL_HEXL_INCLUDE_DIR: ${INTEL_HEXL_INCLUDE_DIR}")

  get_target_property(INTEL_HEXL_LOCATION HEXL::hexl LOCATION)
  message(STATUS "INTEL_HEXL_LOCATION: ${INTEL_HEXL_LOCATION}")

  # TODO(fboemer): Use target_include_directories
  include_directories(${INTEL_HEXL_INCLUDE_DIR})
else()
    # ------------------------------------------------------------------------------
    # Download and install Intel HEXL ...
    # ------------------------------------------------------------------------------
    set(INTEL_HEXL_GIT_REPO_URL https://github.com/intel/hexl)
    set(INTEL_HEXL_GIT_LABEL 1.2.1)

{'fraction_non_alphanumeric': 0.20927419354838708, 'fraction_numerical': 0.00967741935483871, 'mean_word_length': 2.793577981651376, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1872445', 'n_tokens_mistral': 919, 'n_tokens_neox': 843, 'n_words': 141}