Reordering things a bit

I currently have meson 0.52.1 and the default_library=static
option has no effect for me, but I'm leaving it there in case
this changes in the future.
This commit is contained in:
King_DuckZ 2020-05-01 00:14:55 +02:00
parent a3dcb583d7
commit 640cc0e493
2 changed files with 13 additions and 4 deletions

View file

@ -1,10 +1,19 @@
project('wrentest', 'cpp',
version: '1.0.0',
project('wrenpp', 'cpp',
version: '0.1.0',
meson_version: '>=0.49.2',
default_options: ['debug=true', 'cpp_std=c++17', 'b_ndebug=if-release'],
)
wren_dep = dependency('wren', version: '>=0.2.0', fallback: ['wren', 'wren_dep'])
wren_dep = dependency('wren', version: '>=0.2.0',
fallback: ['wren', 'wren_dep'],
default_options: [
'default_library=static',
'build_testing=false',
'wren_with_cli=false',
'wren_installable=false',
],
static: true,
)
public_incl = include_directories('include')
os = host_machine.system()

View file

@ -49,12 +49,12 @@ int main() {
wren::DefConfiguration config;
wren::VM vm(&config);
vm.interpret("my_module", g_script);
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
auto vars = variables<std::string, int>(vm, MN{"my_module", "name"}, MN{"my_module","number"});
std::cout << "name = \"" << std::get<0>(vars) << "\", number = " << std::get<1>(vars) << '\n';
const int sum = wren::call<int>(vm, {"my_module", "Math"}, "sum_params", MN{"my_module", "number"}, 90);
std::cout << "wren method returned " << sum << " (expected " << std::get<1>(vars) + 90 << ")\n";
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
return 0;
}