]> www.ginac.de Git - ginac.git/blob - check/CMakeLists.txt
build: accept both python 3 and python 2
[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_collect_common_factors
22         exam_normalization
23         exam_sqrfree
24         exam_factor
25         exam_pseries
26         exam_matrices
27         exam_lsolve
28         exam_indexed
29         exam_color
30         exam_clifford
31         exam_archive
32         exam_structure
33         exam_misc
34         exam_mod_gcd
35         exam_cra
36         exam_real_imag
37         bugme_chinrem_gcd
38         pgcd_relatively_prime_bug
39         pgcd_infinite_loop)
40
41 set(ginac_timings
42         time_dennyfliegner
43         time_gammaseries
44         time_vandermonde
45         time_toeplitz
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 ${LIBDL_LIBRARIES})
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