aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-04-21 17:07:56 +0200
committerThomas White <taw@physics.org>2023-07-28 13:22:04 +0200
commit01f6f6ec756a435c0187154627e3a8900bcd3e11 (patch)
tree45ef1d6fa9aff86b366a40b8366ee02142d4e815
parent22be2dbc3352dc13978fac5135ddb0141c9625e4 (diff)
Add wrapped Millepede dependency
-rw-r--r--libcrystfel/libcrystfel-config.h.meson.in1
-rw-r--r--libcrystfel/meson.build10
-rw-r--r--subprojects/millepede.wrap9
-rw-r--r--subprojects/packagefiles/millepede/meson.build39
4 files changed, 58 insertions, 1 deletions
diff --git a/libcrystfel/libcrystfel-config.h.meson.in b/libcrystfel/libcrystfel-config.h.meson.in
index 302fae0b..c788c017 100644
--- a/libcrystfel/libcrystfel-config.h.meson.in
+++ b/libcrystfel/libcrystfel-config.h.meson.in
@@ -11,6 +11,7 @@
#mesondefine HAVE_CLOCK_GETTIME
#mesondefine HAVE_HDF5
#mesondefine HAVE_SEEDEE
+#mesondefine HAVE_MILLEPEDE
#mesondefine HAVE_FORKPTY_PTY_H
#mesondefine HAVE_FORKPTY_UTIL_H
diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build
index 8897aaae..cacf0e82 100644
--- a/libcrystfel/meson.build
+++ b/libcrystfel/meson.build
@@ -38,6 +38,13 @@ else
cjsondep = dependency('', required : false)
endif
+millepededep = dependency('millepede',
+ required: false,
+ fallback: ['millepede', 'millepede_dep'])
+if millepededep.found()
+ conf_data.set10('HAVE_MILLEPEDE', true)
+endif
+
xgandalfdep = dependency('xgandalf',
required: false,
fallback: ['xgandalf', 'xgandalf_dep'])
@@ -167,7 +174,8 @@ libcrystfel = library('crystfel', [libcrystfel_sources, libcrystfel_versionc],
dependencies: [mdep, utildep, fftwdep, gsldep, zlibdep,
hdf5dep, pthreaddep,
xgandalfdep, pinkindexerdep, fdipdep,
- ccp4dep, msgpackdep, seedeedep, cjsondep],
+ ccp4dep, msgpackdep, seedeedep, cjsondep,
+ millepededep],
install: true)
libcrystfeldep = declare_dependency(include_directories: libcrystfel_includes,
diff --git a/subprojects/millepede.wrap b/subprojects/millepede.wrap
new file mode 100644
index 00000000..5541d2bc
--- /dev/null
+++ b/subprojects/millepede.wrap
@@ -0,0 +1,9 @@
+[wrap-git]
+directory = millepede
+url = https://gitlab.desy.de/claus.kleinwort/millepede-ii.git
+revision = main
+depth = 1
+patch_directory = millepede
+
+[provide]
+millepede = millepede_dep
diff --git a/subprojects/packagefiles/millepede/meson.build b/subprojects/packagefiles/millepede/meson.build
new file mode 100644
index 00000000..7a535945
--- /dev/null
+++ b/subprojects/packagefiles/millepede/meson.build
@@ -0,0 +1,39 @@
+# Meson file for Millepede-II
+project('millepede', ['c', 'cpp','fortran'],
+ version: '2.0.0',
+ license: 'LGPL2+',
+ default_options: ['buildtype=debugoptimized'])
+
+
+mille = library('mille', ['Mille.cc'],
+ install: true)
+
+millepede_dep = declare_dependency(include_directories: '.',
+ link_with: mille)
+
+executable('pede',
+ ['mpdef.f90',
+ 'mpdalc.f90',
+ 'mpmod.f90',
+ 'mpmon.f90',
+ 'mpbits.f90',
+ 'mpqldec.f90',
+ 'mptest1.f90',
+ 'mptest2.f90',
+ 'mille.f90',
+ 'mpnum.f90',
+ 'mptext.f90',
+ 'mphistab.f90',
+ 'minresDataModule.f90',
+ 'minresModule.f90',
+ 'minresqlpDataModule.f90',
+ 'minresqlpBlasModule.f90',
+ 'minresqlpModule.f90',
+ 'randoms.f90',
+ 'vertpr.f90',
+ 'linesrch.f90',
+ 'Dbandmatrix.f90',
+ 'pede.f90',
+ 'readc.c'],
+ fortran_args: ['-DREAD_C_FILES', '-cpp'],
+ install: true)