<commit_before># Copyright (C) 1995-2019, <NAME> and <NAME>.
# All rights reserved.
#
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.

# CMakeLists.txt for the ROOT test programs.
# This shows nicely how to compile and link applications
# using the ROOT libraries on all supported platforms.
#
# Author: <NAME>, 25/10/2010
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

project(test)
find_package(ROOT REQUIRED)

#---Copy the CTestCustom.cmake file into the build directory---------------------------------
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
enable_testing()

if(CMAKE_SYSTEM_NAME MATCHES Darwin)
  # To avoid to set ld_Library_path to locate the test libraries
  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/.")
endif()

include_directories(${ROOT_INCLUDE_DIRS})
if(DEFINED ROOT_SOURCE_DIR)  # Testing using the binary tree
  include_directories(${ROOT_SOURCE_DIR}/tutorials)
  include_directories(${ROOT_SOURCE_DIR}/tmva/inc)
  set(ROOT_root_CMD ${ROOT_BINDIR}/root.exe)
else()                       # Testing using an installation (assuming access to ROOT CMake modules)
  include_directories(${ROOT_INCLUDE_DIRS}/../tutorials)
  add_definitions(${ROOT_DEFINITIONS})
  include(RootMacros)
endif()

#---environment-------------------------------------------------------------------------------
ROOT_ADD_TEST(show-environment COMMAND ${CMAKE_COMMAND} -E environment)

#---hworld------------------------------------------------------------------------------------
ROOT_EXECUTABLE(hworld hworld.cxx LIBRARIES Gpad)

#---event-------------------------------------------------------------------------------------
ROOT_STANDARD_LIBRARY_PACKAGE(Event
                              NO_INSTALL_HEADERS
                              HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Event.h
                              SOURCES Event.cxx LINKDEF EventLinkDef.h
                              DEPENDENCIES Hist MathCore)
if(MSVC)
  add_custom_command(TARGET Event POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libEvent_rdict.pcm
                                     ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libEvent_rdict.pcm)
endif()
ROOT_EXECUTABLE(eventexe MainEvent.cxx LIBRARIES Event RIO Tree TreePlayer Hist Net)
ROOT_ADD_TEST(test-event COMMAND eventexe)

#---guitest------------------------------------------------------------------------------------<commit_msg>[cmake] reduce includes usage in test<commit_after># Copyright (C) 1995-2019, <NAME> and <NAME>.
# All rights reserved.
#
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.

# CMakeLists.txt for the ROOT test programs.
# This shows nicely how to compile and link applications
# using the ROOT libraries on all supported platforms.
#
# Author: <NAME>, 25/10/2010
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

project(test)
find_package(ROOT REQUIRED)

#---Copy the CTestCustom.cmake file into the build directory---------------------------------
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
enable_testing()

if(CMAKE_SYSTEM_NAME MATCHES Darwin)
  # To avoid to set ld_Library_path to locate the test libraries
  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/.")
endif()

if(DEFINED ROOT_SOURCE_DIR)
  # Testing using the binary tree
  include_directories(${ROOT_SOURCE_DIR}/tutorials)
  set(ROOT_root_CMD ${ROOT_BINDIR}/root.exe)
else()
  # Testing using an installation (assuming access to ROOT CMake modules)
  include_directories(${ROOT_INCLUDE_DIRS})
  include_directories(${ROOT_INCLUDE_DIRS}/../tutorials)
  add_definitions(${ROOT_DEFINITIONS})
  include(RootMacros)
endif()

#---environment-------------------------------------------------------------------------------
ROOT_ADD_TEST(show-environment COMMAND ${CMAKE_COMMAND} -E environment)

#---hworld------------------------------------------------------------------------------------
ROOT_EXECUTABLE(hworld hworld.cxx LIBRARIES Gpad)

#---event-------------------------------------------------------------------------------------
ROOT_STANDARD_LIBRARY_PACKAGE(Event
                              NO_INSTALL_HEADERS
                              HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Event.h
                              SOURCES Event.cxx LINKDEF EventLinkDef.h
                              DEPENDENCIES Hist MathCore)
if(MSVC)
  add_custom_command(TARGET Event POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libEvent_rdict.pcm
                                     ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libEvent_rdict.pcm)
endif()
ROOT_EXECUTABLE(eventexe MainEvent.cxx LIBRARIES Event RIO Tree TreePlayer Hist Net)
ROOT_ADD_TEST(test-event COMMAND eventexe)

#---guitest------------------------------------------------------------------------------------
{'fraction_non_alphanumeric': 0.22312898089171976, 'fraction_numerical': 0.007165605095541401, 'mean_word_length': 2.1524466750313676, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3264095', 'n_tokens_mistral': 1502, 'n_tokens_neox': 1385, 'n_words': 319}