mirror of
https://github.com/ivabus/pantry
synced 2024-11-27 02:35:08 +03:00
github.com/skystrife/cpptoml (#1866)
* new file: projects/github.com/skystrife/cpptoml/package.yml new file: projects/github.com/skystrife/cpptoml/tea.toml new file: projects/github.com/skystrife/cpptoml/test.cc * modified: projects/github.com/skystrife/cpptoml/package.yml * modified: projects/github.com/skystrife/cpptoml/package.yml * modified: projects/github.com/skystrife/cpptoml/package.yml * modified: projects/github.com/skystrife/cpptoml/package.yml * modified: projects/github.com/skystrife/cpptoml/package.yml * modified: projects/github.com/skystrife/cpptoml/package.yml
This commit is contained in:
parent
b9750c1f24
commit
acb42ac427
3 changed files with 44 additions and 0 deletions
29
projects/github.com/skystrife/cpptoml/package.yml
Normal file
29
projects/github.com/skystrife/cpptoml/package.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/skystrife/cpptoml/archive/v0.1.1.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: skystrife/cpptoml
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
gnu.org/gcc: '*'
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
cmake.org: '*'
|
||||||
|
script: |
|
||||||
|
cmake -S . -B build $ARGS
|
||||||
|
cmake --build build
|
||||||
|
cmake --install build
|
||||||
|
env:
|
||||||
|
LD_LIBRARY_PATH: "{{deps.gnu.org/gcc.prefix}}"
|
||||||
|
ARGS:
|
||||||
|
- -DCMAKE_INSTALL_PREFIX="{{prefix}}"
|
||||||
|
- -DENABLE_LIBCXX="ON"
|
||||||
|
- -DCPPTOML_BUILD_EXAMPLES=OFF
|
||||||
|
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
script: |
|
||||||
|
g++ -std=c++11 -I {{prefix}}/include test.cc -o test
|
||||||
|
./test | grep "Hello, Tea"
|
1
projects/github.com/skystrife/cpptoml/tea.toml
Normal file
1
projects/github.com/skystrife/cpptoml/tea.toml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
str = "Hello, Tea."
|
14
projects/github.com/skystrife/cpptoml/test.cc
Normal file
14
projects/github.com/skystrife/cpptoml/test.cc
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#include "cpptoml.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
auto tea = cpptoml::parse_file("tea.toml");
|
||||||
|
auto s = tea->get_as<std::string>("str");
|
||||||
|
|
||||||
|
if (s) {
|
||||||
|
std::cout << *s << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
Loading…
Reference in a new issue