-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
72 lines (62 loc) · 2.29 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
project('coloquinte', 'cpp',
version : '0.3.1',
license : 'MIT',
default_options: [
'cpp_std=c++17',
],
)
if build_machine.system() == 'darwin'
add_project_arguments('-mmacosx-version-min=13.0', language: ['c','cpp'])
endif
coloquinte_includes = include_directories('src')
boost_dep = dependency('boost', required: true, modules: ['system', 'filesystem', 'iostreams', 'program_options', 'unit_test_framework'])
eigen_dep = dependency('eigen3', required: true)
thread_dep = dependency('threads', required: true)
cmake =import('cmake')
cmake_opts = cmake.subproject_options()
cmake_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': true})
cmake_opts.set_install(false)
lemon = cmake.subproject('lemon', options: cmake_opts)
lemon_dep = lemon.dependency('lemon')
sources = [
'src/coloquinte.cpp',
'src/parameters.cpp',
'src/export.cpp',
'src/place_global/net_model.cpp',
'src/place_global/density_legalizer.cpp',
'src/place_global/density_grid.cpp',
'src/place_global/place_global.cpp',
'src/place_detailed/legalizer.cpp',
'src/place_detailed/abacus_legalizer.cpp',
'src/place_detailed/tetris_legalizer.cpp',
'src/place_detailed/row_legalizer.cpp',
'src/place_detailed/place_detailed.cpp',
'src/place_detailed/detailed_placement.cpp',
'src/place_detailed/incr_net_model.cpp',
'src/place_detailed/row_neighbourhood.cpp',
'src/place_global/transportation.cpp',
'src/place_global/transportation_1d.cpp',
]
libcoloquinte = shared_library('coloquinte',
sources,
include_directories : coloquinte_includes,
dependencies : [boost_dep, lemon_dep, eigen_dep, thread_dep],
install : true)
install_headers('src/coloquinte.hpp')
coloquinte_dep = declare_dependency(link_with : libcoloquinte, include_directories: coloquinte_includes)
tests = [
'test_net_model'
, 'test_density_legalizer'
, 'test_density_grid'
, 'test_row_legalizer'
, 'test_legalizer'
, 'test_incr_net_model'
, 'test_detailed_placement'
, 'test_row_neighbourhood'
, 'test_transportation'
, 'test_expansion'
]
foreach testcase: tests
test_exec = executable(testcase, 'test/' + testcase + '.cpp', dependencies: [boost_dep, coloquinte_dep])
test(testcase, test_exec)
endforeach