<commit_before>############################################################################
# CMakeLists.txt file for building ROOT math/minuit2 package
############################################################################

add_definitions(-DWARNINGMSG -DUSE_ROOT_ERROR)

#---Deal with the parallel option on Minuit2. Probably it should be done using a build 'option' and not
#   using a environment variable  -- NOT TESTED ---
if($ENV{USE_PARALLEL_MINUIT2})
  if($ENV{USE_OPENMP})
    add_definitions(-D_GLIBCXX_PARALLEL -fopenmp)
    set_target_properties(Minuit2 PROPERTIES LINK_FLAGS -fopenmp)
  elseif($ENV{USE_MPI})
    add_definitions(-DMPIPROC)
    set(CMAKE_CXX_COMPILER mpic++)
    set(CMAKE_C_COMPILER mpic++)
    set(CMAKE_CXX_LINK_EXECUTABLE mpic++)
  endif()
endif()

ROOT_STANDARD_LIBRARY_PACKAGE(Minuit2
                              HEADERS *.h Minuit2/*.h
                              DICTIONARY_OPTIONS "-writeEmptyRootPCM"
                              DEPENDENCIES MathCore Hist)

ROOT_ADD_TEST_SUBDIRECTORY(test)<commit_msg>Minuit2: Update CMakeLists.txt<commit_after>############################################################################
# CMakeLists.txt file for building ROOT math/minuit2 package
############################################################################

option(minuit2_mpi "Enable support for MPI in Minuit2")
option(minuit2_omp "Enable support for OpenMP in Minuit2")

add_definitions(-DWARNINGMSG -DUSE_ROOT_ERROR)
ROOT_STANDARD_LIBRARY_PACKAGE(Minuit2
                              HEADERS *.h Minuit2/*.h
                              DICTIONARY_OPTIONS "-writeEmptyRootPCM"
                              DEPENDENCIES MathCore Hist)

if(minuit2_omp)
  find_package(OpenMP REQUIRED)
  find_package(Threads REQUIRED)

  if(NOT TARGET OpenMP::OpenMP_CXX)
    add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
    set_property(TARGET OpenMP::OpenMP_CXX
      PROPERTY INTERFACE_COMPILE_DEFINITIONS -D_GLIBCXX_PARALLEL
      PROPERTY INTERFACE_COMPILE_OPTIONS ${OpenMP_CXX_FLAGS}
      PROPERTY INTERFACE_LINK_LIBRARIES ${OpenMP_CXX_LIBRARIES})
  endif()

  target_link_libraries(Minuit2 Threads::Threads OpenMP::OpenMP_CXX)
endif()

if(minuit2_mpi)
  find_package(MPI REQUIRED)

  if(NOT TARGET MPI::MPI_CXX)
    add_library(MPI::MPI_CXX IMPORTED INTERFACE)
    set_property(TARGET MPI::MPI_CXX
      PROPERTY INTERFACE_COMPILE_DEFINITIONS ${MPI_CXX_COMPILE_DEFINITIONS}
      PROPERTY INTERFACE_COMPILE_OPTIONS ${MPI_CXX_COMPILE_FLAGS}
      PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MPI_CXX_INCLUDE_DIRS}
      PROPERTY INTERFACE_LINK_LIBRARIES ${MPI_CXX_LINK_FLAGS} ${MPI_CXX_LIBRARIES})
  endif()

  target_compile_definitions(Minuit2 PUBLIC MPIPROC)
  target_link_libraries(Minuit2 MPI::MPI_CXX)
endif()

ROOT_ADD_TEST_SUBDIRECTORY(test)
{'fraction_non_alphanumeric': 0.17416131334760884, 'fraction_numerical': 0.006780870806566738, 'mean_word_length': 4.639839034205232, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4794307', 'n_tokens_mistral': 960, 'n_tokens_neox': 893, 'n_words': 155}