<commit_before>project(mathmore-tests)
find_package(ROOT REQUIRED)

include(${ROOT_USE_FILE})
include_directories(${ROOT_INCLUDE_DIRS})

set(Libraries Core RIO Net Hist Graf Graf3d Gpad Tree
              Rint Postscript Matrix Physics MathCore Thread MathMore)

set(TestMathMoreSource
      testChebyshev.cxx
     testPermute.cxx
     testDerivation.cxx
     testGSLIntegration.cxx
     testMCIntegration.cxx    
     testGSLRootFinder.cxx			      
     testMinimization1D.cxx
     testInterpolation.cxx
     testRandom.cxx
     testRandomDist.cxx
     testQuasiRandom.cxx
     testSpecFunc.cxx
     testStatFunc.cxx
     testFunctor.cxx
     testVavilov.cxx
     simanTSP.cxx  )


if(ROOT_unuran_FOUND)
  list(APPEND Libraries Unuran)
endif()


if(ROOT_minuit2_FOUND)
  list(APPEND TestSource fit/testMinim.cxx)
  list(APPEND Libraries Minuit2)
endif()


#some tests requires directly gsl
include_directories(${GSL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR})

#---Build and add all the defined test in the list---------------
foreach(file ${TestMathMoreSource})
  get_filename_component(testname ${file} NAME_WE)
  ROOT_EXECUTABLE(${testname} ${file} LIBRARIES ${Libraries} ${GSL_LIBRARIES})
  ROOT_ADD_TEST(mathmore-${testname} COMMAND ${testname}) 
endforeach()

<commit_msg>add the compiler flag -DHAVE_ROOTLIBS for the math more tests<commit_after>project(mathmore-tests)
find_package(ROOT REQUIRED)

include(${ROOT_USE_FILE})
include_directories(${ROOT_INCLUDE_DIRS})

set(Libraries Core RIO Net Hist Graf Graf3d Gpad Tree
              Rint Postscript Matrix Physics MathCore Thread MathMore)

set(TestMathMoreSource
      testChebyshev.cxx
     testPermute.cxx
     testDerivation.cxx
     testGSLIntegration.cxx
     testMCIntegration.cxx    
     testGSLRootFinder.cxx			      
     testMinimization1D.cxx
     testInterpolation.cxx
     testRandom.cxx
     testRandomDist.cxx
     testQuasiRandom.cxx
     testSpecFunc.cxx
     testStatFunc.cxx
     testFunctor.cxx
     testVavilov.cxx
     simanTSP.cxx  )


if(ROOT_unuran_FOUND)
  list(APPEND Libraries Unuran)
endif()


if(ROOT_minuit2_FOUND)
  list(APPEND TestSource fit/testMinim.cxx)
  list(APPEND Libraries Minuit2)
endif()


#some tests requires directly gsl
include_directories(${GSL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR})
add_definitions(-DUSE_ROOT_ERROR -DHAVE_ROOTLIBS)

#---Build and add all the defined test in the list---------------
foreach(file ${TestMathMoreSource})
  get_filename_component(testname ${file} NAME_WE)
  ROOT_EXECUTABLE(${testname} ${file} LIBRARIES ${Libraries} ${GSL_LIBRARIES})
  ROOT_ADD_TEST(mathmore-${testname} COMMAND ${testname}) 
endforeach()


{'fraction_non_alphanumeric': 0.09066767830045523, 'fraction_numerical': 0.0030349013657056147, 'mean_word_length': 4.042065009560229, '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': '7568338', 'n_tokens_mistral': 960, 'n_tokens_neox': 914, 'n_words': 175}