]> www.ginac.de Git - ginac.git/blob - check/CMakeLists.txt
Use "modern" CMake facilities to manage includes and libs
[ginac.git] / check / CMakeLists.txt
1
2 set(ginac_tests
3         check_numeric
4         check_inifcns
5         check_matrices
6         check_lsolve
7         heur_gcd_bug
8         exam_paranoia
9         exam_heur_gcd
10         match_bug
11         parser_bugs
12         exam_numeric_archive
13         exam_numeric
14         exam_powerlaws
15         exam_inifcns
16         exam_inifcns_nstdsums
17         exam_differentiation
18         exam_polygcd
19         exam_collect_common_factors
20         exam_normalization
21         exam_sqrfree
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_misc
32         exam_mod_gcd
33         exam_cra
34         exam_real_imag
35         bugme_chinrem_gcd
36         pgcd_relatively_prime_bug
37         pgcd_infinite_loop)
38
39 set(ginac_timings
40         time_dennyfliegner
41         time_gammaseries
42         time_vandermonde
43         time_toeplitz
44         time_lw_A
45         time_lw_B
46         time_lw_C
47         time_lw_D
48         time_lw_E
49         time_lw_F
50         time_lw_G
51         time_lw_H
52         time_lw_IJKL
53         time_lw_M1
54         time_lw_M2
55         time_lw_N
56         time_lw_O
57         time_lw_P
58         time_lw_Pprime
59         time_lw_Q
60         time_lw_Qprime
61         time_antipode
62         time_fateman_expand
63         time_uvar_gcd
64         time_parser)
65
66 macro(add_ginac_test thename)
67         if ("${${thename}_sources}" STREQUAL "")
68                 set(${thename}_sources ${thename}.cpp ${${thename}_extra_src})
69         endif()
70         add_executable(${thename} EXCLUDE_FROM_ALL ${${thename}_sources})
71         target_link_libraries(${thename} ginac::ginac)
72         add_dependencies(test_suite ${thename})
73         add_dependencies(check ${thename})
74         add_test(NAME ${thename} COMMAND $<TARGET_FILE:${thename}>)
75 endmacro()
76
77 macro(add_ginac_timing thename)
78         set(${thename}_extra_src timer.cpp randomize_serials.cpp)
79         add_ginac_test(${thename})
80         target_compile_definitions(${thename} PRIVATE HAVE_CONFIG_H)
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