<commit_before>
# Copyright (c) 2013 Stefan.<EMAIL>
# finds the ittnotify API
# if not found, installs a dummy ittnotify.h to build_dir/include to eliminate
# the need to protect the itt calls with ifdefs

include(UpdateFile)

if(CMAKE_VERSION VERSION_LESS 2.8.3) # WAR bug
  get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
endif()

if(VTune_FIND_REQUIRED)
  set(_vtune_output 1)
  set(VTUNE_FIND_REQUIRED 1)
elseif(NOT VTune_FIND_QUIETLY)
  set(_vtune_output 1)
endif()

find_program(VTUNE_EXECUTABLE amplxe-cl)
if(NOT VTUNE_EXECUTABLE)
  set(VTUNE_FOUND)
  update_file(${CMAKE_CURRENT_LIST_DIR}/ittnotify.h
    ${CMAKE_BINARY_DIR}/include/ittnotify.h)
  add_definitions(-DINTEL_NO_ITTNOTIFY_API)
  return()
endif()

get_filename_component(VTUNE_DIR ${VTUNE_EXECUTABLE} PATH)
set(VTUNE_DIR "${VTUNE_DIR}/..")

find_path(VTUNE_INCLUDE_DIR ittnotify.h
  HINTS ${VTUNE_DIR}/include
  PATHS /usr/include /usr/local/include /opt/local/include)

find_library(VTUNE_ITTNOTIFY_LIBRARY NAMES ittnotify
  HINTS ${VTUNE_DIR}/lib64
  PATHS /usr/lib /usr/local/lib /opt/local/lib)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VTUNE DEFAULT_MSG
  VTUNE_INCLUDE_DIR VTUNE_ITTNOTIFY_LIBRARY)

set(VTUNE_INCLUDE_DIRS ${VTUNE_INCLUDE_DIR})
set(VTUNE_LIBRARIES ${VTUNE_ITTNOTIFY_LIBRARY} dl) <commit_msg>Adding the dl library only on UNIX platform<commit_after>
# Copyright (c) 2013 Ste<EMAIL>@epfl.ch
# finds the ittnotify API
# if not found, installs a dummy ittnotify.h to build_dir/include to eliminate
# the need to protect the itt calls with ifdefs

include(UpdateFile)

if(CMAKE_VERSION VERSION_LESS 2.8.3) # WAR bug
  get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
endif()

if(VTune_FIND_REQUIRED)
  set(_vtune_output 1)
  set(VTUNE_FIND_REQUIRED 1)
elseif(NOT VTune_FIND_QUIETLY)
  set(_vtune_output 1)
endif()

find_program(VTUNE_EXECUTABLE amplxe-cl)
if(NOT VTUNE_EXECUTABLE)
  set(VTUNE_FOUND)
  update_file(${CMAKE_CURRENT_LIST_DIR}/ittnotify.h
    ${CMAKE_BINARY_DIR}/include/ittnotify.h)
  add_definitions(-DINTEL_NO_ITTNOTIFY_API)
  return()
endif()

get_filename_component(VTUNE_DIR ${VTUNE_EXECUTABLE} PATH)
set(VTUNE_DIR "${VTUNE_DIR}/..")

find_path(VTUNE_INCLUDE_DIR ittnotify.h
  HINTS ${VTUNE_DIR}/include
  PATHS /usr/include /usr/local/include /opt/local/include)

find_library(VTUNE_ITTNOTIFY_LIBRARY NAMES ittnotify
  HINTS ${VTUNE_DIR}/lib64
  PATHS /usr/lib /usr/local/lib /opt/local/lib)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VTUNE DEFAULT_MSG
  VTUNE_INCLUDE_DIR VTUNE_ITTNOTIFY_LIBRARY)

set(VTUNE_INCLUDE_DIRS ${VTUNE_INCLUDE_DIR})
set(VTUNE_LIBRARIES ${VTUNE_ITTNOTIFY_LIBRARY})
if(UNIX)
  list(APPEND VTUNE_LIBRARIES dl)
endif()
{'fraction_non_alphanumeric': 0.09340064911648034, 'fraction_numerical': 0.00865488640461594, 'mean_word_length': 6.903133903133903, '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': '6562139', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1125, 'n_words': 193}