mirror of
https://github.com/pantor/inja.git
synced 2026-02-17 09:03:58 +00:00
improve meson build
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
---
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 2
|
||||
ColumnLimit: 160
|
||||
|
||||
---
|
||||
Language: Cpp
|
||||
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
PointerAlignment: Left
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
SpaceBeforeCtorInitializerColon: false
|
||||
...
|
||||
42
.gitignore
vendored
42
.gitignore
vendored
@@ -1,46 +1,12 @@
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
# Build Folders
|
||||
build
|
||||
buildc
|
||||
dist
|
||||
|
||||
# Coveralls repo token
|
||||
.coveralls.yml
|
||||
|
||||
.vscode
|
||||
.vs
|
||||
|
||||
build
|
||||
build-*
|
||||
|
||||
doc/html
|
||||
doc/latex
|
||||
examples
|
||||
|
||||
__pycache__
|
||||
|
||||
examples
|
||||
|
||||
34
meson.build
34
meson.build
@@ -1,4 +1,10 @@
|
||||
project('inja', 'cpp', default_options: ['cpp_std=c++17'])
|
||||
project(
|
||||
'inja',
|
||||
'cpp',
|
||||
version: '3.3.0',
|
||||
default_options: ['cpp_std=c++17', 'warning_level=3'],
|
||||
meson_version: '>=0.56'
|
||||
)
|
||||
|
||||
|
||||
inja_dep = declare_dependency(
|
||||
@@ -6,18 +12,30 @@ inja_dep = declare_dependency(
|
||||
)
|
||||
|
||||
|
||||
amalg_script = files('scripts/update_single_include.sh')
|
||||
|
||||
amalg_files = files(
|
||||
install_headers(
|
||||
'include/inja/config.hpp',
|
||||
'include/inja/environment.hpp',
|
||||
'include/inja/exceptions.hpp',
|
||||
'include/inja/function_storage.hpp',
|
||||
'include/inja/inja.hpp',
|
||||
'include/inja/renderer.hpp',
|
||||
'include/inja/environment.hpp',
|
||||
'include/inja/lexer.hpp',
|
||||
'include/inja/node.hpp',
|
||||
'include/inja/parser.hpp',
|
||||
'include/inja/renderer.hpp',
|
||||
'include/inja/statistics.hpp',
|
||||
'include/inja/template.hpp',
|
||||
'include/inja/token.hpp',
|
||||
'include/inja/utils.hpp',
|
||||
subdir: 'inja'
|
||||
)
|
||||
|
||||
amalg_tgt = run_target( 'amalg',
|
||||
command: amalg_script
|
||||
|
||||
run_command(
|
||||
find_program('scripts/update_single_include.sh'),
|
||||
check: true
|
||||
)
|
||||
|
||||
|
||||
if get_option('build_tests')
|
||||
inja_test = executable(
|
||||
'inja_test',
|
||||
|
||||
@@ -265,7 +265,7 @@ TEST_CASE("callbacks") {
|
||||
CHECK(env.render("{{ double-greetings() }}", data) == "Hello Hello!");
|
||||
CHECK(env.render("{{ multiply(4, 5) }}", data) == "20.0");
|
||||
CHECK(env.render("{{ multiply(4, 2 + 3) }}", data) == "20.0");
|
||||
CHECK(env.render("{{ multiply(2 + 2, 5) }}", data) == "20.0");
|
||||
CHECK(env.render("{{ multiply(2 + 2, 6) }}", data) == "24.0");
|
||||
CHECK(env.render("{{ multiply(length(\"tester\"), 5) }}", data) == "30.0");
|
||||
CHECK(env.render("{{ multiply(5, length(\"t\")) }}", data) == "5.0");
|
||||
CHECK(env.render("{{ multiply(3, 4, 5) }}", data) == "60.0");
|
||||
|
||||
Reference in New Issue
Block a user