Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions quaddtype/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,24 @@ endif

qblas_dep = dependency('qblas', fallback: ['qblas', 'qblas_dep'])

sleef_subproj = subproject('sleef', required: true)
sleef_dep = sleef_subproj.get_variable('sleef_dep')
sleefquad_dep = sleef_subproj.get_variable('sleefquad_dep')
# Try to find SLEEF system-wide first, fall back to subproject if not found
sleef_dep = dependency('sleef', fallback: ['sleef', 'sleef_dep'], required: false)

if sleef_dep.found() and sleef_dep.type_name() != 'internal'
# SLEEF found system-wide - both sleef and sleefquad are typically in the same installation
cpp = meson.get_compiler('cpp')
sleefquad_lib = cpp.find_library('sleefquad', required: true)
sleefquad_dep = declare_dependency(
dependencies: [sleef_dep, sleefquad_lib]
)
message('Using system-wide SLEEF installation')
else
# Fall back to subproject which provides both dependencies
sleef_subproj = subproject('sleef')
sleef_dep = sleef_subproj.get_variable('sleef_dep')
sleefquad_dep = sleef_subproj.get_variable('sleefquad_dep')
message('Using SLEEF subproject')
endif

incdir_numpy = run_command(py,
['-c', 'import numpy; print(numpy.get_include())'],
Expand Down
2 changes: 1 addition & 1 deletion quaddtype/reinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ fi
# export CFLAGS="-g -O0"
# export CXXFLAGS="-g -O0"
python -m pip uninstall -y numpy_quaddtype
python -m pip install . -v --no-build-isolation 2>&1 | tee build_log.txt
python -m pip install . -vv --no-build-isolation 2>&1 | tee build_log.txt
Loading