[f18679]: iAIDA / examples / CMakeLists.txt  Maximize  Restore  History

Download this file

85 lines (63 with data), 2.1 kB

 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# iAIDA/examples
macro (setup exeName testString)
add_executable( ${exeName} ${exeName}.cpp)
TARGET_LINK_LIBRARIES( ${exeName} iAIDA ${EXTERNAL_LIBS})
add_test ( ${exeName} ${exeName} )
set_tests_properties ( ${exeName} PROPERTIES PASS_REGULAR_EXPRESSION ${testString} )
endmacro (setup)
# generic examples
set ( exaFiles exaH1
exaH2
exaH3
exaTree
exaTreeReader
exaTuple
exaTupleRead
)
foreach (exa_ ${exaFiles} )
setup( ${exa_} "That's it")
endforeach()
# additional setup:
set_tests_properties ( exaTreeReader PROPERTIES PASS_REGULAR_EXPRESSION "All OK" )
set_property(TEST exaTupleRead APPEND PROPERTY DEPENDS exaTuple)
set_property(TEST exaTreeReader APPEND PROPERTY DEPENDS exaTree)
set( allExamples ${exaFiles} )
# tests with root
if (ROOT_FOUND)
set( exaFilesRoot storeRoot
readRoot
storeRootTup
readRootTup
)
foreach(exa_ ${exaFilesRoot} )
setup( ${exa_} "That's it")
endforeach()
set_property(TEST readRoot APPEND PROPERTY DEPENDS storeRoot)
set_property(TEST readRootTup APPEND PROPERTY DEPENDS storeRootTup)
set( allExamples ${allExamples} ${exaFilesRoot} )
endif (ROOT_FOUND)
# tests for hbook
if (CERNLIB_FOUND)
set( exaFilesHbk storeHbk
readHbk
storeHbkTup
readHbkTup
storeHbkCWN
readHbkCWN
)
foreach(exa_ ${exaFilesHbk} )
setup( ${exa_} "That's it")
endforeach()
set_property(TEST readHbk APPEND PROPERTY DEPENDS storeHbk)
set_property(TEST readHbkTup APPEND PROPERTY DEPENDS storeHbkTup)
set_property(TEST readHbkCWN APPEND PROPERTY DEPENDS storeHbkCWN)
set( allExamples ${allExamples} ${exaFilesHbk} )
endif (CERNLIB_FOUND)
IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
message("... examples set up")
ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)
if ( ${IAIDA_INSTALL_EXAMPLES} MATCHES ON)
foreach(exa_ ${exaFiles} )
install(PROGRAMS ${PROJECT_BINARY_DIR}/examples/${exa_} DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/iAIDA )
endforeach()
endif ( ${IAIDA_INSTALL_EXAMPLES} MATCHES ON)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks