Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
usadelndsoc
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JYU Condensed Matter Theory
usadelndsoc
Commits
5c0e8cbd
Commit
5c0e8cbd
authored
1 year ago
by
patavirt
Browse files
Options
Downloads
Patches
Plain Diff
meson: add fallback options for eigen/cppad
parent
7372de12
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
meson.build
+24
-2
24 additions, 2 deletions
meson.build
meson_options.txt
+6
-0
6 additions, 0 deletions
meson_options.txt
with
30 additions
and
2 deletions
meson.build
+
24
−
2
View file @
5c0e8cbd
...
...
@@ -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'
,
...
...
This diff is collapsed.
Click to expand it.
meson_options.txt
0 → 100644
+
6
−
0
View file @
5c0e8cbd
option
(
'cppad_inc'
,
type
:
'string'
)
option
(
'cppad_lib'
,
type
:
'string'
)
option
(
'eigen_inc'
,
type
:
'string'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment