Skip to content

Commit ef99748

Browse files
committed
Minor folder restructuring and support for extra benchmarks.
1 parent ad19993 commit ef99748

File tree

8 files changed

+28
-22
lines changed

8 files changed

+28
-22
lines changed

meson.build

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,7 @@ frozen_dep = dependency('frozen')
2424
ff_dep = dependency('fast_float')
2525
natsort_dep = dependency('natsort')
2626

27-
vs_templ_lib = library(
28-
'vs-templ',
29-
[
30-
'src/vs-templ.cpp',
31-
'src/utils.cpp',
32-
'src/stack-lang.cpp',
33-
],
34-
dependencies: [pugixml_dep, frozen_dep, ff_dep, natsort_dep],
35-
include_directories: ['include'],
36-
install: not meson.is_subproject(),
37-
)
38-
39-
vs_templ_cli = executable(
40-
'vs.templ',
41-
['src/app/main.cpp'],
42-
dependencies: [pugixml_dep],
43-
link_with: [vs_templ_lib],
44-
include_directories: ['include'],
45-
install: not meson.is_subproject(),
46-
)
27+
subdir(['./src/'])
4728

4829
pandoc = find_program('pandoc', required: false)
4930
if pandoc.found()
@@ -77,6 +58,10 @@ if get_option('tests')
7758
subdir(['./test/'])
7859
endif
7960

61+
if get_option('benchmarks')
62+
subdir(['./benchmark/'])
63+
endif
64+
8065
subdir(['./metadata/'])
8166

8267
pconf = import('pkgconfig')

meson.options

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
option('tests', type: 'boolean', value: true)
1+
option('tests', type: 'boolean', value: true)
2+
option('benchmarks', type: 'boolean', value: false)

old/codegen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
# Not used for now.
3-
gperf ./schemas/vm.gperf --output-file ./src/vm.autogen.cpp
3+
gperf ./schemas/vm.gperf --output-file ./src/lib/vm.autogen.cpp
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/meson.build

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
vs_templ_lib = library(
2+
'vs-templ',
3+
[
4+
'lib/vs-templ.cpp',
5+
'lib/utils.cpp',
6+
'lib/stack-lang.cpp',
7+
],
8+
dependencies: [pugixml_dep, frozen_dep, ff_dep, natsort_dep],
9+
include_directories: ['../include'],
10+
install: not meson.is_subproject(),
11+
)
12+
13+
vs_templ_cli = executable(
14+
'vs.templ',
15+
['app/main.cpp'],
16+
dependencies: [pugixml_dep],
17+
link_with: [vs_templ_lib],
18+
include_directories: ['../include'],
19+
install: not meson.is_subproject(),
20+
)

0 commit comments

Comments
 (0)