-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
35 lines (28 loc) · 1.78 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.13)
enable_testing()
# Disable build at top-level of sources
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
if("${srcdir}" STREQUAL "${bindir}")
message("Do not build on the top level source.")
message(FATAL_ERROR "Hint: git clean -d -f -x -n")
endif()
project(MC)
set(CMAKE_INSTALL_PREFIX .)
add_subdirectory(mc)
add_subdirectory(analysis)
# add your project here
add_custom_target(alltar DEPENDS mc analysis)
## Tests
add_test(NAME small_mc COMMAND ../bin/mc -p ../bench -m run.mac -o mc_small.root -r -l FTFP_BERT) # store commands in ROOT
add_test(NAME small_mc2 COMMAND ../bin/mc -p ../bench -m run.mac -o mc_small2.root -k -l FTFP_BERT) # store commands as ascii macro
add_test(NAME reproducibility COMMAND ../bin/reproducibility -i mc_small.root -j mc_small2.root -t mc) # both tree is the same
add_test(NAME dump1 COMMAND sh -c "../bin/dump.sh mc_small.root >> dump1.txt")
add_test(NAME dump2 COMMAND sh -c "../bin/dump.sh mc_small2.root >> dump2.txt")
add_test(NAME dump_tree_diff COMMAND diff dump1.txt dump2.txt)
add_test(NAME batch_mc COMMAND ../bin/mc -p ../bench -m bat.mac -o mc.root -k -s 1 -l FTFP_BERT) # a bit more production
add_test(NAME exists_macro COMMAND ls ./mc_macro.txt) # generated macro exists
add_test(NAME run_batch_again COMMAND ../bin/mc -p ../bench -m mc_macro.txt -o mc_repro.root -k -r -s 1 -l FTFP_BERT) # run with generated macro
add_test(NAME reproducibility_macro COMMAND ../bin/reproducibility -i mc.root -j mc_repro.root -t mc) # check again
add_test(NAME mcProcessing COMMAND ../bin/mcProcessing -i mc.root -o processed.root --clone) # Processing
add_test(NAME basic_check COMMAND ../bin/basic_check -i processed.root) # basic check for processing tree