mirror of
https://github.com/ivabus/pantry
synced 2024-11-29 19:55:06 +03:00
package.yml
test.cpp test.xml
This commit is contained in:
parent
e2ad251ab3
commit
355a995441
3 changed files with 46 additions and 0 deletions
34
projects/pugixml.org/package.yml
Normal file
34
projects/pugixml.org/package.yml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/zeux/pugixml/releases/download/v{{version.marketing}}/pugixml-{{version.marketing}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: zeux/pugixml
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
cmake.org: '*'
|
||||||
|
script: |
|
||||||
|
cmake -S . -B build $ARGS
|
||||||
|
cmake --build build
|
||||||
|
cmake --install build
|
||||||
|
env:
|
||||||
|
ARGS:
|
||||||
|
- -DBUILD_SHARED_LIBS=ON
|
||||||
|
- -DPUGIXML_BUILD_SHARED_AND_STATIC_LIBS=ON
|
||||||
|
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
||||||
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
|
- -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||||
|
- -Wno-dev
|
||||||
|
- -DBUILD_TESTING=OFF
|
||||||
|
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
freedesktop.org/pkg-config: '*'
|
||||||
|
script: |
|
||||||
|
pkg-config --modversion pugixml | grep {{version.marketing}}
|
||||||
|
g++ test.cpp -o test -lpugixml
|
||||||
|
./test
|
11
projects/pugixml.org/test.cpp
Normal file
11
projects/pugixml.org/test.cpp
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#include <pugixml.hpp>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
pugi::xml_document doc;
|
||||||
|
pugi::xml_parse_result result = doc.load_file("test.xml");
|
||||||
|
|
||||||
|
assert(result);
|
||||||
|
assert(strcmp(doc.child_value("root"), "Hello world!") == 0);
|
||||||
|
}
|
1
projects/pugixml.org/test.xml
Normal file
1
projects/pugixml.org/test.xml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<root>Hello world!</root>
|
Loading…
Reference in a new issue