This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into pkg.template
- Loading branch information
Showing
9 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# !!! DO NOT PLACE HEADER GUARDS HERE !!! | ||
|
||
include(hunter_add_version) | ||
include(hunter_cacheable) | ||
include(hunter_download) | ||
include(hunter_pick_scheme) | ||
|
||
hunter_add_version( | ||
PACKAGE_NAME | ||
Zug | ||
VERSION | ||
0.0.1-be20cae | ||
URL | ||
"https://github.com/arximboldi/zug/archive/be20cae36e7e5876bf5bfb08b2a0562e1db3b546.zip" | ||
SHA1 | ||
2d129f233691e0abca99e039bbe66e46e0be74a1 | ||
) | ||
|
||
hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
hunter_cacheable(Zug) | ||
hunter_download( | ||
PACKAGE_NAME Zug | ||
PACKAGE_INTERNAL_DEPS_ID "1" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2019 Niall Douglas https://www.nedproductions.biz/ | ||
# All rights reserved. | ||
|
||
# !!! DO NOT PLACE HEADER GUARDS HERE !!! | ||
|
||
include(hunter_add_version) | ||
include(hunter_cacheable) | ||
include(hunter_cmake_args) | ||
include(hunter_download) | ||
include(hunter_pick_scheme) | ||
include(hunter_source_subdir) | ||
|
||
hunter_add_version( | ||
PACKAGE_NAME | ||
zstd | ||
VERSION | ||
1.4.5-d73e2fb-p0 | ||
URL | ||
"https://github.com/facebook/zstd/archive/d73e2fb465c9289f5a6871cef1fe48de917a5cc2.tar.gz" | ||
SHA1 | ||
e770f4ff39ca7b40790e2fe61339cc84b63c0a8d | ||
) | ||
|
||
hunter_source_subdir(zstd SOURCE_SUBDIR "build/cmake") | ||
|
||
hunter_cmake_args(zstd CMAKE_ARGS | ||
ZSTD_BUILD_PROGRAMS=OFF | ||
) | ||
|
||
hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
hunter_cacheable(zstd) | ||
hunter_download(PACKAGE_NAME zstd) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. spelling:: | ||
|
||
Zug | ||
|
||
.. index:: | ||
single: unsorted ; Zug | ||
|
||
.. _pkg.Zug: | ||
|
||
Zug | ||
=== | ||
|
||
- `Official <https://github.com/arximboldi/zug>`__ | ||
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/Zug/CMakeLists.txt>`__ | ||
- Added by `Joerg-Christian Boehme <https://github.com/Bjoe>`__ (`pr-107 <https://github.com/ruslo/hunter/pull/107>`__) | ||
|
||
.. literalinclude:: /../examples/Zug/CMakeLists.txt | ||
:language: cmake | ||
:start-after: # DOCUMENTATION_START { | ||
:end-before: # DOCUMENTATION_END } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.. spelling:: | ||
|
||
zstd | ||
libzstd_shared | ||
|
||
.. index:: compression ; zstd | ||
|
||
.. _pkg.zstd: | ||
|
||
zstd | ||
==== | ||
|
||
- `Official <https://github.com/facebook/zstd>`__ | ||
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/zstd/CMakeLists.txt>`__ | ||
|
||
.. code-block:: cmake | ||
find_package(Threads REQUIRED) | ||
hunter_add_package(zstd) | ||
find_package(zstd CONFIG REQUIRED) | ||
target_link_libraries(... zstd::libzstd_static Threads::Threads) | ||
`zstd::libzstd_shared` target is also available. It will already be | ||
linked with `Threads::Threads`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) | ||
# All rights reserved. | ||
|
||
cmake_minimum_required(VERSION 3.2) | ||
|
||
# Emulate HunterGate: | ||
# * https://github.com/cpp-pm/gate | ||
include("../common.cmake") | ||
|
||
project(Zug) | ||
|
||
# DOCUMENTATION_START { | ||
hunter_add_package(Boost) | ||
find_package(Boost CONFIG REQUIRED) | ||
|
||
hunter_add_package(Zug) | ||
find_package(Zug CONFIG REQUIRED) | ||
|
||
add_executable(boo boo.cpp) | ||
target_link_libraries(boo PUBLIC zug Boost::boost) | ||
# DOCUMENTATION_END } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <zug/compose.hpp> | ||
#include <zug/run.hpp> | ||
#include <zug/transducer/map.hpp> | ||
#include <zug/transducer/read.hpp> | ||
#include <zug/transducer/write.hpp> | ||
|
||
#include <sstream> | ||
#include <vector> | ||
#include <iostream> | ||
|
||
using namespace zug; | ||
|
||
int main() { | ||
auto input = std::stringstream{"1 2 3 4 5"}; | ||
auto output = std::stringstream{}; | ||
|
||
run(comp(read<int>(input), write(output, ';'))); | ||
std::cout << output.str(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) 2019 Niall Douglas | ||
# All rights reserved. | ||
|
||
cmake_minimum_required(VERSION 3.0) | ||
|
||
# Emulate HunterGate: | ||
# * https://github.com/cpp-pm/gate | ||
include("../common.cmake") | ||
|
||
project(download-zstd) | ||
find_package(Threads REQUIRED) | ||
|
||
hunter_add_package(zstd) | ||
find_package(zstd CONFIG REQUIRED) | ||
|
||
add_executable(foo-static foo.c) | ||
target_link_libraries(foo-static PUBLIC zstd::libzstd_static Threads::Threads) | ||
|
||
add_executable(foo-shared foo.c) | ||
target_link_libraries(foo-shared PUBLIC zstd::libzstd_shared) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <zstd.h> | ||
|
||
int main() { | ||
ZSTD_DCtx *_decompression_ctx = ZSTD_createDCtx(); | ||
ZSTD_freeDCtx(_decompression_ctx); | ||
return 0; | ||
} |