<commit_before>project(Lima)
cmake_minimum_required(VERSION 2.8.3)

enable_testing()

include(ExternalProject)

macro (CompileLimaSubproject _project _dependsOn)

  ExternalProject_Add(
    ${_project}
    DOWNLOAD_COMMAND ""
    PATCH_COMMAND ""
    UPDATE_COMMAND ""
    TEST_COMMAND make test
    SOURCE_DIR ${CMAKE_SOURCE_DIR}/${_project}/
    INSTALL_DIR $ENV{LIMA_DIST}
    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=$ENV{LIMA_DIST} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DLIMA_VERSION_RELEASE:STRING="${LIMA_VERSION_RELEASE}"
  )
  if (NOT "x${_dependsOn}" STREQUAL "x")
    add_dependencies(${_project} ${_dependsOn})
  endif()

  if ("x${CMAKE_BUILD_TYPE}" STREQUAL "xRelease")
    ExternalProject_Add_Step(${_project} packaging
    COMMAND make package
    COMMENT "Packaging ${_project}"
    WORKING_DIRECTORY <BINARY_DIR>
    DEPENDEES install
    )
  endif()

  ## Force rebuilding of the main subproject every time building from super structure
  ExternalProject_Add_Step(${_project} forcebuild
    COMMAND ${CMAKE_COMMAND} -E remove
    ${CMAKE_CURRENT_BUILD_DIR}/${_project}-prefix/src/${_project}-stamp/${_project}-build
    DEPENDEES configure
    DEPENDERS build
    ALWAYS 1
  )
  
endmacro ()
<commit_msg>do not auto test and package on windows as vs project are generated<commit_after>project(Lima)
cmake_minimum_required(VERSION 2.8.3)

enable_testing()

include(ExternalProject)

macro (CompileLimaSubproject _project _dependsOn)

  ## Define test command.
  if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
    set(_TEST_COMMAND "make test")
  else()
    set(_TEST_COMMAND "")
  endif()
  
  ## Add external project
  ExternalProject_Add(
    ${_project}
    DOWNLOAD_COMMAND ""
    PATCH_COMMAND ""
    UPDATE_COMMAND ""
    TEST_COMMAND "${_TEST_COMMAND}"
    SOURCE_DIR ${CMAKE_SOURCE_DIR}/${_project}/
    INSTALL_DIR $ENV{LIMA_DIST}
    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=$ENV{LIMA_DIST} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DLIMA_VERSION_RELEASE:STRING="${LIMA_VERSION_RELEASE}"
  )

  ## Add specified dependencies
  if (NOT "x${_dependsOn}" STREQUAL "x")
    add_dependencies(${_project} ${_dependsOn})
  endif()

    ## Add packaging command
  if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
    if ("x${CMAKE_BUILD_TYPE}" STREQUAL "xRelease")
      ExternalProject_Add_Step(${_project} packaging
      COMMAND make package
      COMMENT "Packaging ${_project}"
      WORKING_DIRECTORY <BINARY_DIR>
      DEPENDEES install
      )
    endif()
  endif()

  ## Force rebuilding of the main subproject every time building from super structure
  ExternalProject_Add_Step(${_project} forcebuild
    COMMAND ${CMAKE_COMMAND} -E remove
    ${CMAKE_CURRENT_BUILD_DIR}/${_project}-prefix/src/${_project}-stamp/${_project}-build
    DEPENDEES configure
    DEPENDERS build
    ALWAYS 1
  )
  
endmacro ()

{'fraction_non_alphanumeric': 0.10799438990182328, 'fraction_numerical': 0.002805049088359046, 'mean_word_length': 4.627218934911243, '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': '293504', 'n_tokens_mistral': 1022, 'n_tokens_neox': 945, 'n_words': 192}