-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
121 lines (85 loc) · 5.51 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
cmake_minimum_required (VERSION 3.10)
include(CheckCXXCompilerFlag)
project(
cxx_integration
VERSION 0.6
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-psabi -Wno-deprecated-declarations -Wold-style-cast")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
enable_testing()
add_custom_target(make_cxx_integration_output_dir ALL
COMMAND ${CMAKE_COMMAND} -E make_directory output)
find_package(Doxygen)
if (DOXYGEN_FOUND)
add_custom_target(docs_cxx_integration
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docs
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUTPUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation for cxx_integration" VERBATIM
)
endif (DOXYGEN_FOUND)
add_library(cxx_integration_math_constants INTERFACE)
target_include_directories(cxx_integration_math_constants INTERFACE 3rdparty/cxx_math_const/include)
add_library(cxx_integration_polynomial INTERFACE)
target_include_directories(cxx_integration_polynomial INTERFACE 3rdparty/cxx_polynomial/include)
add_library(cxx_integration_fp_utils INTERFACE)
target_include_directories(cxx_integration_fp_utils INTERFACE 3rdparty/cxx_fp_utils/include)
add_library(cxx_integration_complex_utils INTERFACE)
target_include_directories(cxx_integration_complex_utils INTERFACE 3rdparty/cxx_complex_utils/include)
target_link_libraries(cxx_integration_complex_utils INTERFACE cxx_integration_fp_utils)
add_library(cxx_integration_numeric_limits INTERFACE)
target_include_directories(cxx_integration_numeric_limits INTERFACE 3rdparty/cxx_numeric_limits/include)
add_library(cxx_integration_special_functions INTERFACE)
target_include_directories(cxx_integration_special_functions INTERFACE 3rdparty/cxx_special_functions/include)
target_link_libraries(cxx_integration_special_functions
INTERFACE cxx_integration_numeric_limits cxx_integration_fp_utils cxx_integration_math_constants)
add_library(cxx_integration INTERFACE)
target_include_directories(cxx_integration INTERFACE include)
target_link_libraries(cxx_integration INTERFACE cxx_integration_complex_utils)
add_library(test_utils INTERFACE)
target_include_directories(test_utils INTERFACE test/include)
add_executable(test_phase_iterator test/src/test_phase_iterator.cpp)
target_link_libraries(test_phase_iterator
cxx_integration)
add_executable(test_quadrature test/src/test_quadrature.cpp)
target_link_libraries(test_quadrature test_utils cxx_integration cxx_integration_special_functions)
add_executable(test_trapezoid_integral test/src/test_trapezoid_integral.cpp)
target_link_libraries(test_trapezoid_integral cxx_integration cxx_integration_polynomial)
add_executable(test_midpoint_integral test/src/test_midpoint_integral.cpp)
target_link_libraries(test_midpoint_integral cxx_integration cxx_integration_polynomial)
add_executable(test_simpson_integral test/src/test_simpson_integral.cpp)
target_link_libraries(test_simpson_integral cxx_integration cxx_integration_polynomial)
add_executable(test_double_exp_integrate test/src/test_double_exp_integrate.cpp)
target_link_libraries(test_double_exp_integrate cxx_integration cxx_integration_polynomial)
add_executable(test_gauss_hermite test/src/test_gauss_hermite.cpp)
target_link_libraries(test_gauss_hermite cxx_integration)
add_executable(test_gauss_laguerre test/src/test_gauss_laguerre.cpp)
target_link_libraries(test_gauss_laguerre cxx_integration)
add_executable(test_mapper test/src/test_mapper.cpp)
target_link_libraries(test_mapper cxx_integration)
add_executable(test_composite_trapezoid_integral test/src/test_composite_trapezoid_integral.cpp)
target_link_libraries(test_composite_trapezoid_integral cxx_integration cxx_integration_polynomial)
add_executable(test_gauss_kronrod_rule test/src/test_gauss_kronrod_rule.cpp)
target_link_libraries(test_gauss_kronrod_rule cxx_integration)
add_executable(test_factorial_integration test/src/test_factorial.cpp)
target_link_libraries(test_factorial_integration cxx_integration_special_functions)
# Standard library special function orthonormality checks.
add_executable(integration_orthonorm_assoc_laguerre orthonorm_test/src/orthonorm_assoc_laguerre.cc)
target_link_libraries(integration_orthonorm_assoc_laguerre cxx_integration cxx_integration_special_functions)
add_executable(integration_orthonorm_assoc_legendre orthonorm_test/src/orthonorm_assoc_legendre.cc)
target_link_libraries(integration_orthonorm_assoc_legendre cxx_integration cxx_integration_special_functions)
add_executable(integration_orthonorm_hermite orthonorm_test/src/orthonorm_hermite.cc)
target_link_libraries(integration_orthonorm_hermite cxx_integration cxx_integration_special_functions)
add_executable(integration_orthonorm_laguerre orthonorm_test/src/orthonorm_laguerre.cc)
target_link_libraries(integration_orthonorm_laguerre cxx_integration cxx_integration_special_functions)
add_executable(integration_orthonorm_legendre orthonorm_test/src/orthonorm_legendre.cc)
target_link_libraries(integration_orthonorm_legendre cxx_integration cxx_integration_special_functions)
add_executable(integration_orthonorm_sph_legendre orthonorm_test/src/orthonorm_sph_legendre.cc)
target_link_libraries(integration_orthonorm_sph_legendre cxx_integration cxx_integration_special_functions)
# Compile tests.
add_executable(test_complex_deduction test/src/test_complex_deduction.cpp)
target_link_libraries(test_complex_deduction cxx_integration)
add_executable(test_complex_cquad_deduction test/src/test_complex_cquad_deduction.cpp)
target_link_libraries(test_complex_cquad_deduction cxx_integration)