<commit_before>#
# Install ilastik headless (non-GUI) from source
#
# Ilastik is composed of 3 git repos, 2 of which are necessary for headless mode.
#
# lazyflow
# ilastik
# volumina (for gui builds)
#
# Also, you must build lazyflow/lazyflow/drtile with CMake to produce drtile.so shared library.
# This is done in the CONFIGURE_COMMAND below and the shared library is saved in the
# drtile source directory.

if (NOT ilastik_NAME)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (TemplateSupport)

include (vigra)
include (h5py)
include (psutil)
include (blist)
include (greenlet)
include (cylemon)
include (yapsy)
include (pgmlink)
include (scikit-learn)

# select the desired ilastik commit
set(DEFAULT_ILASTIK_VERSION "flyem-20130702")
IF(NOT DEFINED ILASTIK_VERSION)
    SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}")
ENDIF()
SET(ILASTIK_VERSION ${ILASTIK_VERSION}
    CACHE STRING "Specify ilastik branch/tag/commit to be used (default: ${DEFAULT_ILASTIK_VERSION})"
    FORCE)
    
external_git_repo (ilastik
    ${ILASTIK_VERSION}
    https://github.com/janelia-flyem/flyem-ilastik
    ilastik)
set(lazyflow_SRC_DIR "${ilastik_SRC_DIR}/lazyflow")

if("${ILASTIK_VERSION}" STREQUAL "master")

    set(ILASTIK_UPDATE_COMMAND cd lazyflow && git checkout master && git pull && cd .. && cd volumina && git checkout master && git pull && cd .. && cd ilastik && git checkout master && git pull && cd ..)

else()

    set(ILASTIK_UPDATE_COMMAND git checkout ${ILASTIK_VERSION} && git submodule update)
    
endif()
    
message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...")

set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} 
                            ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME}
                            ${cylemon_NAME} ${scikit-learn_NAME})

if (NOT "${CMAKE_CPLEX_ROOT_DIR}" STREQUAL "")
    # Tracking depends on pgmlink, which depends on CPLEX.
    # Most people don't have CPLEX installed on their system.
    set (ilastik_dependencies ${ilastik_dependencies}  ${pgmlink_NAME})
endif()
<commit_msg>ilastik.cmake: Message for cplex location.<commit_after>#
# Install ilastik headless (non-GUI) from source
#
# Ilastik is composed of 3 git repos, 2 of which are necessary for headless mode.
#
# lazyflow
# ilastik
# volumina (for gui builds)
#
# Also, you must build lazyflow/lazyflow/drtile with CMake to produce drtile.so shared library.
# This is done in the CONFIGURE_COMMAND below and the shared library is saved in the
# drtile source directory.

if (NOT ilastik_NAME)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (TemplateSupport)

include (vigra)
include (h5py)
include (psutil)
include (blist)
include (greenlet)
include (cylemon)
include (yapsy)
include (pgmlink)
include (scikit-learn)

# select the desired ilastik commit
set(DEFAULT_ILASTIK_VERSION "flyem-20130702")
IF(NOT DEFINED ILASTIK_VERSION)
    SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}")
ENDIF()
SET(ILASTIK_VERSION ${ILASTIK_VERSION}
    CACHE STRING "Specify ilastik branch/tag/commit to be used (default: ${DEFAULT_ILASTIK_VERSION})"
    FORCE)
    
external_git_repo (ilastik
    ${ILASTIK_VERSION}
    https://github.com/janelia-flyem/flyem-ilastik
    ilastik)
set(lazyflow_SRC_DIR "${ilastik_SRC_DIR}/lazyflow")

if("${ILASTIK_VERSION}" STREQUAL "master")

    set(ILASTIK_UPDATE_COMMAND cd lazyflow && git checkout master && git pull && cd .. && cd volumina && git checkout master && git pull && cd .. && cd ilastik && git checkout master && git pull && cd ..)

else()

    set(ILASTIK_UPDATE_COMMAND git checkout ${ILASTIK_VERSION} && git submodule update)
    
endif()
    
message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...")

set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} 
                            ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME}
                            ${cylemon_NAME} ${scikit-learn_NAME})

if (NOT "${CMAKE_CPLEX_ROOT_DIR}" STREQUAL "")
    # Tracking depends on pgmlink, which depends on CPLEX.
    # Most people don't have CPLEX installed on their system.
    message ("Building ilastik with CPLEX located in ${CMAKE_CPLEX_ROOT_DIR}")
    set (ilastik_dependencies ${ilastik_dependencies}  ${pgmlink_NAME})
endif()

{'fraction_non_alphanumeric': 0.10720720720720721, 'fraction_numerical': 0.006306306306306306, 'mean_word_length': 4.489493201483313, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3251216', 'n_tokens_mistral': 1574, 'n_tokens_neox': 1492, 'n_words': 418}