mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
github.com/nemtrif/utfcpp (#2316)
* github.com/nemtrif/utfcpp * hmm... try tea.xyz/gx/make for linux test * test +gnu.org/gcc: '*' * LDFLAGS * -DCMAKE_CXX_FLAGS="-std=c++14" * LD_LIBRARY_PATH * -DCMAKE_CXX_FLAGS="-std=c++17" * gc++ maybe * without DCMAKE_CXX_COMPILER * -gnu.org/gcc: '*' * +tea.xyz/gx/cc: c99 * test deps
This commit is contained in:
parent
f0e5f5b286
commit
e3c1626dfe
5
projects/github.com/nemtrif/utfcpp/CMakeLists.txt
Normal file
5
projects/github.com/nemtrif/utfcpp/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||
project(utf8_append LANGUAGES CXX)
|
||||
find_package(utf8cpp REQUIRED CONFIG)
|
||||
add_executable(utf8_append utf8_append.cpp)
|
||||
target_link_libraries(utf8_append PRIVATE utf8cpp)
|
47
projects/github.com/nemtrif/utfcpp/package.yml
Normal file
47
projects/github.com/nemtrif/utfcpp/package.yml
Normal file
|
@ -0,0 +1,47 @@
|
|||
distributable:
|
||||
url: https://github.com/nemtrif/utfcpp/archive/v{{version}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
display-name: utf8cpp
|
||||
|
||||
versions:
|
||||
github: nemtrif/utfcpp
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
tea.xyz/gx/make: '*'
|
||||
cmake.org: '*'
|
||||
darwin:
|
||||
gnu.org/gcc: '*'
|
||||
linux:
|
||||
tea.xyz/gx/cc: c99
|
||||
|
||||
working-directory: build
|
||||
script:
|
||||
- cmake .. $ARGS
|
||||
- make --jobs {{ hw.concurrency }} install
|
||||
env:
|
||||
ARGS:
|
||||
- -DUTF8_INSTALL:BOOL=ON
|
||||
- -DUTF8_SAMPLES:BOOL=OFF
|
||||
- -DUTF8_TESTS:BOOL=OFF
|
||||
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
||||
- -DCMAKE_INSTALL_LIBDIR=lib
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_FIND_FRAMEWORK=LAST
|
||||
- -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
- -Wno-dev
|
||||
- -DBUILD_TESTING=OFF
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
cmake.org: '*'
|
||||
tea.xyz/gx/make: '*'
|
||||
darwin:
|
||||
gnu.org/gcc: '*'
|
||||
linux:
|
||||
tea.xyz/gx/cc: c99
|
||||
script:
|
||||
- cmake . -DCMAKE_PREFIX_PATH:STRING="test" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
|
||||
- make
|
||||
- ./utf8_append
|
6
projects/github.com/nemtrif/utfcpp/utf8_append.cpp
Normal file
6
projects/github.com/nemtrif/utfcpp/utf8_append.cpp
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include <utf8.h>
|
||||
int main() {
|
||||
unsigned char u[5] = {0, 0, 0, 0, 0};
|
||||
utf8::append(0x0448, u);
|
||||
return (u[0] == 0xd1 && u[1] == 0x88 && u[2] == 0 && u[3] == 0 && u[4] == 0) ? 0 : 1;
|
||||
}
|
Loading…
Reference in a new issue