@@ -4,126 +4,7 @@ project(
44 version : ' 0.2.2' ,
55 license : ' BSD-3-Clause AND MIT AND BSD-3-Clause-LBNL AND Apache-2.0 WITH LLVM-exception' ,
66 license_files : [' LICENSE' , ' LICENSES_bundled.txt' ],
7- meson_version : ' >=1.5.0' ,
8- default_options : [' cpp_std=c++17' ]
7+ meson_version : ' >=1.5.0'
98)
109
11- # Get compiler
12- cpp = meson .get_compiler(' cpp' )
13-
14- # ========================================
15- # BLAS/LAPACK Dependencies -- needed for Mathieu fcns.
16- # ========================================
17- blas_name = get_option (' blas' )
18- lapack_name = get_option (' lapack' )
19-
20- if blas_name == ''
21- # Auto-detect BLAS
22- blas = dependency (' blas' , required : false )
23- if not blas.found()
24- blas = cpp.find_library (' blas' , required : false )
25- endif
26- if not blas.found()
27- blas = dependency (' openblas' , required : false )
28- endif
29- if not blas.found()
30- blas = cpp.find_library (' openblas' , required : true )
31- endif
32- else
33- # Use specified BLAS
34- blas = dependency (blas_name, required : true )
35- endif
36-
37- if lapack_name == ''
38- # Auto-detect LAPACK
39- lapack = dependency (' lapack' , required : false )
40- if not lapack.found()
41- lapack = cpp.find_library (' lapack' , required : false )
42- endif
43- if not lapack.found()
44- lapack = dependency (' openblas' , required : false )
45- endif
46- if not lapack.found()
47- lapack = cpp.find_library (' openblas' , required : true )
48- endif
49- else
50- # Use specified LAPACK
51- lapack = dependency (lapack_name, required : true )
52- endif
53-
54- message (' xsf: BLAS library: ' + blas.type_name())
55- message (' xsf: LAPACK library: ' + lapack.type_name())
56-
57- # Combined dependency
58- blas_lapack_dep = declare_dependency (
59- dependencies : [blas, lapack]
60- )
61-
62- # ========================================
63- # Float128 Configuration
64- # ========================================
65-
66- # Check for _Float128 support
67- float128_code = '''
68- int main() {
69- _Float128 x = 1.0;
70- return 0;
71- }
72- '''
73-
74- has_float128 = cpp.compiles(float128_code, name : ' _Float128 support' )
75-
76- # Configuration data
77- conf_data = configuration_data ()
78- conf_data.set(' HAVE_FLOAT128' , has_float128)
79- configure_file (
80- output : ' xsf_config.h' ,
81- configuration : conf_data
82- )
83-
84- # ========================================
85- # Includes
86- # ========================================
87- xsf_inc = include_directories (' include' )
88-
89-
90- # ========================================
91- # Declare Dependency
92- # ========================================
93-
94- xsf_dep = declare_dependency (
95- include_directories : xsf_inc,
96- dependencies : blas_lapack_dep,
97- )
98-
99- # Make it discoverable
100- meson .override_dependency(' xsf' , xsf_dep)
101-
102- # ========================================
103- # Installation
104- # ========================================
105-
106- if not meson .is_subproject()
107- # Install headers
108- install_headers (
109- ' include/xsf/mathieu/mathieu_fcns.h' ,
110- subdir : ' xsf/mathieu'
111- )
112-
113- # Install pkg-config file
114- pkg = import (' pkgconfig' )
115- pkg.generate(
116- xsf_lib,
117- name : ' xsf' ,
118- description : ' XSF Special Functions Library' ,
119- version : meson .project_version(),
120- )
121- endif
122-
123- # ========================================
124- # Tests (optional)
125- # ========================================
126-
127- if get_option (' build_tests' )
128- subdir (' tests' )
129- endif
10+ xsf_dep = declare_dependency (include_directories : ' include' )
0 commit comments