meson.build 1.78 KB
Newer Older
Lukas Weber's avatar
Lukas Weber committed
1
2
3
rng_names = {
  'stl_mt19937' : 'rng_stl<std::mt19937>',
  'internal_mersenne' : 'rng_internal_mersenne',
laochailan's avatar
laochailan committed
4
  'intel_mkl' : 'rng_intel_mkl',
Lukas Weber's avatar
Lukas Weber committed
5
6
7
}

conf_data = configuration_data()
8
9
conf_data.set('RNG_BACKEND', rng_names[get_option('rng_backend')])
conf_data.set('HAVE_INTEL_MKL', mkl_dep.found())
Lukas Weber's avatar
Lukas Weber committed
10
11
configure_file(input : 'config.h.in',
  output : 'config.h',
12
13
  install : should_install,
  install_dir : 'include/loadleveller',
Lukas Weber's avatar
Lukas Weber committed
14
  configuration : conf_data)
15
config_inc = include_directories('.')
Lukas Weber's avatar
Lukas Weber committed
16

Lukas Weber's avatar
Lukas Weber committed
17
18
loadleveller_sources = files([
  'evalable.cpp',
19
20
  'iodump.cpp',
  'jobinfo.cpp',
Lukas Weber's avatar
Lukas Weber committed
21
22
23
24
25
26
27
  'mc.cpp',
  'measurements.cpp',
  'merger.cpp',
  'observable.cpp',
  'parser.cpp',
  'results.cpp',
  'runner.cpp',
28
  'runner_pt.cpp',
Lukas Weber's avatar
Lukas Weber committed
29
30
  'runner_single.cpp',
  'runner_task.cpp',
31
  'util.cpp',
Lukas Weber's avatar
Lukas Weber committed
32
33
34
35
])

loadleveller_headers = files([
  'evalable.h',
36
37
  'iodump.h',
  'jobinfo.h',
Lukas Weber's avatar
Lukas Weber committed
38
39
40
41
42
43
44
  'loadleveller.h',
  'mc.h',
  'measurements.h',
  'merger.h',
  'observable.h',
  'parser.h',
  'random.h',
laochailan's avatar
laochailan committed
45
46
47
48
  'random/MersenneTwister.h',
  'random/stl_random.h',
  'random/intel_mkl.h',
  'random/internal_mt.h',
Lukas Weber's avatar
Lukas Weber committed
49
50
  'results.h',
  'runner.h',
51
  'runner_pt.h',
Lukas Weber's avatar
Lukas Weber committed
52
53
  'runner_single.h',
  'runner_task.h',
54
  'util.h',
Lukas Weber's avatar
Lukas Weber committed
55
56
57
58
59
60
])

libloadleveller = library('loadleveller',
  loadleveller_sources,
  dependencies : loadleveller_deps,
  version : meson.project_version(),
61
  install : should_install,
62
  override_options : ['c_std=none']
Lukas Weber's avatar
Lukas Weber committed
63
64
)

65
66
67
if should_install
  pkg = import('pkgconfig')
  pkg.generate(libloadleveller,
68
    description : 'Framework for distributed (quantum) Monte Carlo codes',
69
70
71
72
  )
  
  install_headers(loadleveller_headers, subdir : 'loadleveller')
endif
Lukas Weber's avatar
Lukas Weber committed
73
74

loadleveller_dep = declare_dependency(
75
  include_directories : [ include_directories('../include/'), config_inc ],
Lukas Weber's avatar
Lukas Weber committed
76
77
78
79
  link_with : libloadleveller,
  dependencies : loadleveller_deps,
  version : meson.project_version(),
)