<commit_before>cmake_minimum_required(VERSION 2.8)

if (DEFINED CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING
   "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel.")
else()
   set(CMAKE_BUILD_TYPE Release CACHE STRING
   "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel.")
endif()

set(CMAKE_MODULE_PATH
    "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
    "${CMAKE_CURRENT_SOURCE_DIR}/cmake/externals"
    "${CMAKE_CURRENT_SOURCE_DIR}/medInria/cmake"
    ${CMAKE_MODULE_PATH})

project(medinria-full)

include(ExternalProjects)
include(CheckEnvironment)

set(MEDINRIA_TEST_DATA_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/medInria-testdata)
set(packages Qt dtk VTK ITK dcmtk TTK QtDcm RPI medInria)

#   There are three possibilities:
#       - if the option USE_SYSTEM_${PACKAGE} is set, then the system version will be used (not yet tested)
#       - if the option USE_SYSTEM_${PACKAGE} is not set:
#           o if there is a subdir with the package name, in which case this subdir is used directly
#           o otherwise use download and compile locally the package as an external module.

foreach (package ${packages})
    call(${package}_project)
endforeach()
<commit_msg>Add global targets for the independant steps configure, update, build and install<commit_after>cmake_minimum_required(VERSION 2.8)

if (DEFINED CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING
   "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel.")
else()
   set(CMAKE_BUILD_TYPE Release CACHE STRING
   "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel.")
endif()

set(CMAKE_MODULE_PATH
    "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
    "${CMAKE_CURRENT_SOURCE_DIR}/cmake/externals"
    "${CMAKE_CURRENT_SOURCE_DIR}/medInria/cmake"
    ${CMAKE_MODULE_PATH})

project(medinria-full)

include(ExternalProjects)
include(CheckEnvironment)

set(MEDINRIA_TEST_DATA_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/medInria-testdata)
set(packages Qt dtk VTK ITK dcmtk TTK QtDcm RPI medInria)

# This adds global targets that run this step in every subproject
set(global_targets configure update build install)
set_property(DIRECTORY PROPERTY EP_STEP_TARGETS ${global_targets})

foreach (target ${global_targets})
    add_custom_target(${target})
endforeach()

#   There are three possibilities:
#       - if the option USE_SYSTEM_${PACKAGE} is set, then the system version will be used (not yet tested)
#       - if the option USE_SYSTEM_${PACKAGE} is not set:
#           o if there is a subdir with the package name, in which case this subdir is used directly
#           o otherwise use download and compile locally the package as an external module.

foreach (package ${packages})
    call(${package}_project)
	foreach (target ${global_targets})
		    add_dependencies(${target} ${package}-${target})
	endforeach()
endforeach()

{'fraction_non_alphanumeric': 0.08277027027027027, 'fraction_numerical': 0.0013513513513513514, 'mean_word_length': 5.030549898167006, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3895202', 'n_tokens_mistral': 952, 'n_tokens_neox': 912, 'n_words': 286}