-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
52 lines (37 loc) · 1.91 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
###########################
# COMPILATION
###########################
cmake_minimum_required(VERSION 3.3)
project(MiModule VERSION "1.0.0")
#Finds ROOT and Falaise packages and defines cmake variables
find_package(Falaise REQUIRED)
find_package(ROOT REQUIRED)
if(${Falaise_VERSION} VERSION_LESS 4.0.2)
message(FATAL_ERROR "ERROR (MiModule): This version of MiModule is compatible only with Falaise version 4.0.2 or higher! Please use a version of MiModule compatible with your Falaise version (e.g. version 0.0.0)! You can also use Falaise 4.0.2 or higher.")
endif()
include_directories(include ${Bayeux_INCLUDE_DIRS})
file(GLOB SOURCES "src/*.cpp" "src/dicts/*.cpp")
add_library(MiModule SHARED ${SOURCES})
target_link_libraries(MiModule PUBLIC Falaise::Falaise ${ROOT_LIBRARIES})
###########################
# TESTING
###########################
# Configure example pipeline script for use from the build dir
configure_file("p_MiModule_v00.conf.in" "p_MiModule_v00.conf" @ONLY)
# Add a basic test of reading a brio file output by the
# standard pipeline
enable_testing()
# - Simulate
add_test(NAME testMiModule_simulate
COMMAND Falaise::flsimulate -o test-simu.brio
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../testing_products/)
# - Reconstruct
add_test(NAME testMiModule_reconstruct
COMMAND Falaise::flreconstruct -i test-simu.brio -p urn:snemo:demonstrator:reconstruction:3.0:pipeline:official-3.0 -o test-reco.brio
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../testing_products/)
set_tests_properties(testMiModule_reconstruct PROPERTIES DEPENDS testSensitivityModule_simulate)
# - Run Module
add_test(NAME testMiModule_main
COMMAND Falaise::flreconstruct -i test-reco.brio -p ../testing_products/p_MiModule_v00.conf
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../testing_products/)
set_tests_properties(testMiModule_main PROPERTIES DEPENDS testMiModule_reconstruct)