<commit_before># This module finds an installed Vigra package.
#
# It sets the following variables:
#  VIGRA_FOUND              - Set to false, or undefined, if vigra isn't found.
#  VIGRA_INCLUDE_DIR        - Vigra include directory.
#  VIGRA_VIGRANUMPYCORE_LIBRARY      - Vigra's vigranumpycore library
#  VIGRA_VIGRANUMPYCORE_LIBRARY_DIR  - path to Vigra vigranumpycore library


# configVersion.hxx only present, after build of Vigra
FIND_PATH(VIGRA_INCLUDE_DIR vigra/configVersion.hxx PATHS $ENV{VIGRA_ROOT}/include ENV CPLUS_INCLUDE_PATH)

EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
                            "import vigra.vigranumpycore; print vigra.vigranumpycore.__file__"
                            RESULT_VARIABLE VIGRA_VIGRANUMPYCORE_LIBRARY_NOT_FOUND
                            OUTPUT_VARIABLE VIGRA_VIGRANUMPYCORE_LIBRARY
                            OUTPUT_STRIP_TRAILING_WHITESPACE)

IF(NOT VIGRA_VIGRANUMPYCORE_LIBRARY_NOT_FOUND)
    GET_FILENAME_COMPONENT(VIGRA_VIGRANUMPYCORE_LIBRARY_PATH ${VIGRA_VIGRANUMPYCORE_LIBRARY} PATH)
    SET( VIGRA_VIGRANUMPYCORE_LIBRARY_DIR ${VIGRA_VIGRANUMPYCORE_LIBRARY_PATH} CACHE PATH "Path to Vigra's vigranumpycore library.")

    MESSAGE(STATUS "Found VIGRA")
    MESSAGE(STATUS "  > vigranumpy: ${VIGRA_VIGRANUMPYCORE_LIBRARY}")
    MESSAGE(STATUS "  > includes:   ${VIGRA_INCLUDE_DIR}")<commit_msg>cmake/modules/FindVIGRA.cmake: Try to get VIGRA_ROOT from the path.<commit_after># This module finds an installed Vigra package.
#
# It sets the following variables:
#  VIGRA_FOUND              - Set to false, or undefined, if vigra isn't found.
#  VIGRA_INCLUDE_DIR        - Vigra include directory.
#  VIGRA_VIGRANUMPYCORE_LIBRARY      - Vigra's vigranumpycore library
#  VIGRA_VIGRANUMPYCORE_LIBRARY_DIR  - path to Vigra vigranumpycore library


# See if VIGRA_ROOT was set externally, if so use it.
if (NOT "$ENV{VIGRA_ROOT}" STREQUAL "")
    set(VIGRA_ROOT $ENV{BOOST_ROOT})
elseif (NOT "$ENV{VIGRAROOT}" STREQUAL "")
      set(VIGRA_ROOT $ENV{VIGRAROOT})
      set(ENV{VIGRA_ROOT} $ENV{VIGRA_ROOT})
endif()

# configVersion.hxx only present, after build of Vigra
FIND_PATH(VIGRA_INCLUDE_DIR vigra/configVersion.hxx PATHS $ENV{VIGRA_ROOT}/include ENV CPLUS_INCLUDE_PATH)

EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
                            "import vigra.vigranumpycore; print vigra.vigranumpycore.__file__"
                            RESULT_VARIABLE VIGRA_VIGRANUMPYCORE_LIBRARY_NOT_FOUND
                            OUTPUT_VARIABLE VIGRA_VIGRANUMPYCORE_LIBRARY
                            OUTPUT_STRIP_TRAILING_WHITESPACE)

IF(NOT VIGRA_VIGRANUMPYCORE_LIBRARY_NOT_FOUND)
    GET_FILENAME_COMPONENT(VIGRA_VIGRANUMPYCORE_LIBRARY_PATH ${VIGRA_VIGRANUMPYCORE_LIBRARY} PATH)
    SET( VIGRA_VIGRANUMPYCORE_LIBRARY_DIR ${VIGRA_VIGRANUMPYCORE_LIBRARY_PATH} CACHE PATH "Path to Vigra's vigranumpycore library.")

    MESSAGE(STATUS "Found VIGRA")
    MESSAGE(STATUS "  > vigranumpy: ${VIGRA_VIGRANUMPYCORE_LIBRARY}")
    MESSAGE(STATUS "  > includes:   ${VIGRA_INCLUDE_DIR}")
{'fraction_non_alphanumeric': 0.06933946763062768, 'fraction_numerical': 0.0, 'mean_word_length': 3.8164556962025316, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6411775', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1117, 'n_words': 203}