<commit_before>include(ExternalProject)

ExternalProject_Add(
  numgrid
  PREFIX "${PROJECT_BINARY_DIR}/numgrid"
  GIT_REPOSITORY https://github.com/dftlibs/numgrid.git
  GIT_TAG v1.1.0
  INSTALL_COMMAND true  # currently no install command
  CMAKE_ARGS
    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
    -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
    -DENABLE_UNIT_TESTS=OFF
  )

include(GNUInstallDirs)
link_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/${CMAKE_INSTALL_LIBDIR})

# workaround:
# different dynamic lib suffix on mac
if(APPLE)
    set(_dyn_lib_suffix dylib)
else()
    set(_dyn_lib_suffix so)
endif()

set(NUMGRID_LIBS
    libnumgrid.${_dyn_lib_suffix}
    )

include_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid/numgrid)
include_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/modules)
include_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/numgrid)
include_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/include)
<commit_msg>we need the numgrid fortran interface<commit_after>include(ExternalProject)

ExternalProject_Add(
  numgrid
  PREFIX "${PROJECT_BINARY_DIR}/numgrid"
  GIT_REPOSITORY https://github.com/dftlibs/numgrid.git
  GIT_TAG v1.1.0
  INSTALL_COMMAND true  # currently no install command
  CMAKE_ARGS
    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
    -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
    -DENABLE_UNIT_TESTS=OFF
    -DENABLE_FC_SUPPORT=ON
  )

include(GNUInstallDirs)
link_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/${CMAKE_INSTALL_LIBDIR})

# workaround:
# different dynamic lib suffix on mac
if(APPLE)
    set(_dyn_lib_suffix dylib)
else()
    set(_dyn_lib_suffix so)
endif()

set(NUMGRID_LIBS
    libnumgrid.${_dyn_lib_suffix}
    )

include_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid/numgrid)
include_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/modules)
include_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/numgrid)
include_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/include)

{'fraction_non_alphanumeric': 0.10540915395284327, 'fraction_numerical': 0.0027739251040221915, 'mean_word_length': 6.566433566433567, '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': '2980908', 'n_tokens_mistral': 858, 'n_tokens_neox': 818, 'n_words': 90}