Skip to content
Snippets Groups Projects
Commit 5c0e8cbd authored by patavirt's avatar patavirt
Browse files

meson: add fallback options for eigen/cppad

parent 7372de12
No related branches found
No related tags found
No related merge requests found
......@@ -3,15 +3,37 @@ project('usadelndsoc', ['cpp', 'fortran'],
meson_version: '>= 0.55.0',
default_options : ['cpp_std=c++17', 'build.cpp_std=c++17'])
cpp = meson.get_compiler('cpp')
cppad_dep = dependency('cppad')
eigen3_dep = dependency('eigen3')
if not cppad_dep.found()
cppad_dep = cpp.find_library('libcppad_lib',
dirs : [get_option('cppad_lib')],
has_headers : ['cppad/cppad.h'],
header_include_directories : [get_option('cppad_inc')])
if not cppad_dep.found()
cppad_dep = cpp.find_library('cppad_lib',
dirs : [get_option('cppad_lib')],
has_headers : ['cppad/cppad.h'],
header_include_directories : [get_option('cppad_inc')],
required : true)
endif
endif
if not eigen3_dep.found()
if cpp.has_header('Eigen/Core', include_directories : [get_option('eigen_lib')])
eigen3_dep = declare_dependency(include_directories : [get_option('eigen_lib')])
else
error('Eigen/Core header not found')
endif
endif
py_mod = import('python')
py3 = py_mod.find_installation('python3')
py3_dep = py3.dependency()
cpp = meson.get_compiler('cpp')
incdir_numpy = run_command(py3,
[
'-c',
......
option('cppad_inc',
type: 'string')
option('cppad_lib',
type: 'string')
option('eigen_inc',
type: 'string')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment