Skip to content

Commit ea47bb1

Browse files
committed
improve meson build
1 parent 44b23f2 commit ea47bb1

File tree

4 files changed

+31
-61
lines changed

4 files changed

+31
-61
lines changed

.clang-format

Lines changed: 0 additions & 14 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,12 @@
1-
# Prerequisites
2-
*.d
3-
4-
# Compiled Object files
5-
*.slo
6-
*.lo
7-
*.o
8-
*.obj
9-
10-
# Precompiled Headers
11-
*.gch
12-
*.pch
13-
14-
# Compiled Dynamic libraries
15-
*.so
16-
*.dylib
17-
*.dll
18-
19-
# Compiled Static libraries
20-
*.lai
21-
*.la
22-
*.a
23-
*.lib
24-
25-
# Executables
26-
*.exe
27-
*.out
28-
*.app
29-
30-
# Build Folders
31-
build
32-
buildc
33-
dist
34-
35-
# Coveralls repo token
361
.coveralls.yml
37-
382
.vscode
393
.vs
404

5+
build
6+
build-*
7+
418
doc/html
429
doc/latex
10+
examples
4311

4412
__pycache__
45-
46-
examples

meson.build

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
1-
project('inja', 'cpp', default_options: ['cpp_std=c++17'])
1+
project(
2+
'inja',
3+
'cpp',
4+
version: '3.3.0',
5+
default_options: ['cpp_std=c++17', 'warning_level=3'],
6+
meson_version: '>=0.56'
7+
)
28

39

410
inja_dep = declare_dependency(
511
include_directories: include_directories('include', 'third_party/include')
612
)
713

814

9-
amalg_script = files('scripts/update_single_include.sh')
10-
11-
amalg_files = files(
15+
install_headers(
16+
'include/inja/config.hpp',
17+
'include/inja/environment.hpp',
18+
'include/inja/exceptions.hpp',
19+
'include/inja/function_storage.hpp',
1220
'include/inja/inja.hpp',
13-
'include/inja/renderer.hpp',
14-
'include/inja/environment.hpp',
21+
'include/inja/lexer.hpp',
22+
'include/inja/node.hpp',
23+
'include/inja/parser.hpp',
24+
'include/inja/renderer.hpp',
25+
'include/inja/statistics.hpp',
26+
'include/inja/template.hpp',
27+
'include/inja/token.hpp',
28+
'include/inja/utils.hpp',
29+
subdir: 'inja'
1530
)
1631

17-
amalg_tgt = run_target( 'amalg',
18-
command: amalg_script
32+
33+
run_command(
34+
find_program('scripts/update_single_include.sh'),
35+
check: true
1936
)
2037

38+
2139
if get_option('build_tests')
2240
inja_test = executable(
2341
'inja_test',

test/test-functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ TEST_CASE("callbacks") {
265265
CHECK(env.render("{{ double-greetings() }}", data) == "Hello Hello!");
266266
CHECK(env.render("{{ multiply(4, 5) }}", data) == "20.0");
267267
CHECK(env.render("{{ multiply(4, 2 + 3) }}", data) == "20.0");
268-
CHECK(env.render("{{ multiply(2 + 2, 5) }}", data) == "20.0");
268+
CHECK(env.render("{{ multiply(2 + 2, 6) }}", data) == "24.0");
269269
CHECK(env.render("{{ multiply(length(\"tester\"), 5) }}", data) == "30.0");
270270
CHECK(env.render("{{ multiply(5, length(\"t\")) }}", data) == "5.0");
271271
CHECK(env.render("{{ multiply(3, 4, 5) }}", data) == "60.0");

0 commit comments

Comments
 (0)