0445a4a10f2a336bfabd0dcafa8f5ba0cd687bad
[ginac.git] / check / CMakeLists.txt
1 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../ginac)
2 add_definitions(-DIN_GINAC)
3
4 set(ginac_tests
5         check_numeric
6         check_inifcns
7         check_matrices
8         check_lsolve
9         heur_gcd_bug
10         exam_paranoia
11         exam_heur_gcd
12         match_bug
13         parser_bugs
14         exam_numeric_archive
15         exam_numeric
16         exam_powerlaws
17         exam_inifcns
18         exam_inifcns_nstdsums
19         exam_differentiation
20         exam_polygcd
21         exam_normalization
22         exam_factor
23         exam_pseries
24         exam_matrices
25         exam_lsolve
26         exam_indexed
27         exam_color
28         exam_clifford
29         exam_archive
30         exam_structure
31         exam_hashmap
32         exam_misc
33         exam_mod_gcd
34         exam_cra
35         bugme_chinrem_gcd
36         factor_univariate_bug
37         pgcd_relatively_prime_bug
38         pgcd_infinite_loop)
39
40 set(ginac_timings
41         time_dennyfliegner
42         time_gammaseries
43         time_vandermonde
44         time_toeplitz
45         time_hashmap
46         time_lw_A
47         time_lw_B
48         time_lw_C
49         time_lw_D
50         time_lw_E
51         time_lw_F
52         time_lw_G
53         time_lw_H
54         time_lw_IJKL
55         time_lw_M1
56         time_lw_M2
57         time_lw_N
58         time_lw_O
59         time_lw_P
60         time_lw_Pprime
61         time_lw_Q
62         time_lw_Qprime
63         time_antipode
64         time_fateman_expand
65         time_uvar_gcd
66         time_parser)
67
68 macro(add_ginac_test thename)
69         if ("${${thename}_sources}" STREQUAL "")
70                 set(${thename}_sources ${thename}.cpp ${${thename}_extra_src})
71         endif()
72         add_executable(${thename} EXCLUDE_FROM_ALL ${${thename}_sources})
73         target_link_libraries(${thename} ginac)
74         add_dependencies(check ${thename})
75         add_test(NAME ${thename} COMMAND ${thename}${CMAKE_EXECUTABLE_SUFFIX})
76 endmacro()
77
78 macro(add_ginac_timing thename)
79         set(${thename}_extra_src timer.cpp randomize_serials.cpp)
80         add_ginac_test(${thename})
81 endmacro()
82
83 set(check_matrices_extra_src genex.cpp)
84 set(check_lsolve_extra_src genex.cpp)
85 set(exam_heur_gcd_sources heur_gcd_bug.cpp)
86 set(exam_numeric_archive_sources numeric_archive.cpp)
87
88 foreach(tst ${ginac_tests})
89         add_ginac_test(${tst})
90 endforeach()
91
92 foreach(tmr ${ginac_timings})
93         add_ginac_timing(${tmr})
94 endforeach()
95