forked from cpp-pm/hunter
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit * First compiling version * Cleanup hunter.cmake * Fix findings * Add pull request id
- Loading branch information
Showing
5 changed files
with
88 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,31 @@ | ||
# !!! DO NOT PLACE HEADER GUARDS HERE !!! | ||
|
||
include(hunter_add_version) | ||
include(hunter_cacheable) | ||
include(hunter_cmake_args) | ||
include(hunter_download) | ||
include(hunter_pick_scheme) | ||
|
||
hunter_add_version( | ||
PACKAGE_NAME | ||
cppfs | ||
VERSION | ||
1.3.0 | ||
URL | ||
"https://github.com/cginternals/cppfs/archive/v1.3.0.zip" | ||
SHA1 | ||
b7ac401ba784c691546cd087a76701c39ed8f418 | ||
) | ||
|
||
hunter_cmake_args( | ||
cppfs | ||
CMAKE_ARGS | ||
OPTION_BUILD_TESTS=OFF | ||
) | ||
|
||
hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
hunter_cacheable(cppfs) | ||
hunter_download( | ||
PACKAGE_NAME cppfs | ||
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,20 @@ | ||
.. spelling:: | ||
|
||
cppfs | ||
|
||
.. index:: | ||
single: unsorted ; cppfs | ||
|
||
.. _pkg.cppfs: | ||
|
||
cppfs | ||
===== | ||
|
||
- `Official <https://github.com/cginternals/cppfs>`__ | ||
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/cppfs/CMakeLists.txt>`__ | ||
- Added by `Joerg-Christian Boehme <https://github.com/Bjoe>`__ (`pr-92 <https://github.com/cpp-pm/hunter/pull/92>`__) | ||
|
||
.. literalinclude:: /../examples/cppfs/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,18 @@ | ||
# Copyright (c) 2016-2018, Ruslan Baratov | ||
# All rights reserved. | ||
|
||
cmake_minimum_required(VERSION 3.2) | ||
|
||
# Emulate HunterGate: | ||
# * https://github.com/hunter-packages/gate | ||
include("../common.cmake") | ||
|
||
project(cppfs) | ||
|
||
# DOCUMENTATION_START { | ||
hunter_add_package(cppfs) | ||
find_package(cppfs CONFIG REQUIRED) | ||
|
||
add_executable(boo boo.cpp) | ||
target_link_libraries(boo PRIVATE cppfs::cppfs) | ||
# 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,18 @@ | ||
#include <iostream> | ||
#include <cppfs/fs.h> | ||
#include <cppfs/FileHandle.h> | ||
|
||
using namespace cppfs; | ||
|
||
int main() { | ||
FileHandle fh = fs::open("testfile"); | ||
|
||
if (fh.isFile()) | ||
{ | ||
auto in = fh.createInputStream(); | ||
// ... | ||
|
||
auto out = fh.createOutputStream(); | ||
// ... | ||
} | ||
} |