Skip to content

Commit

Permalink
Add ned14-internal-quickcpplib in preparation for Outcome and then LL…
Browse files Browse the repository at this point in the history
…FIO.
  • Loading branch information
ned14 committed Dec 7, 2021
1 parent 75fa113 commit 3a61066
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ hunter_default_version(nanoflann VERSION 1.2.3-p0)
hunter_default_version(nanosvg VERSION 0.0.0-2b08dee-p0)
hunter_default_version(ncnn VERSION 20180314-p2)
hunter_default_version(ncursesw VERSION 6.1)
hunter_default_version(ned14-internal-quickcpplib VERSION 0.0.0-ef0fe8ec)
hunter_default_version(nlohmann_fifo_map VERSION 0.0.0-0dfbf5d-p1)
hunter_default_version(nlohmann_json VERSION 3.8.0)
hunter_default_version(nng VERSION 1.1.1)
Expand Down
30 changes: 30 additions & 0 deletions cmake/projects/ned14-internal-quickcpplib/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) 2021 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
ned14-internal-quickcpplib
VERSION
0.0.0-ef0fe8ec
URL
"https://github.com/ned14/quickcpplib/archive/ef0fe8ecf9951717b63b27447ddcaf5cc8eed6e2.tar.gz"
SHA1
3a36f46f4e03893d908894aa7e6d78f7ab1fe0bf
)

hunter_cmake_args(ned14-internal-quickcpplib CMAKE_ARGS
PROJECT_IS_DEPENDENCY=ON
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(ned14-internal-quickcpplib)
hunter_download(PACKAGE_NAME ned14-internal-quickcpplib)
22 changes: 22 additions & 0 deletions docs/packages/pkg/ned14-internal-quickcpplib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. spelling::

QuickCppLib
quickcpplib
ned14-internal-quickcpplib

.. _pkg.ned14-internal-quickcpplib:

ned14-internal-quickcpplib
==========================

- `Official <https://github.com/ned14/quickcpplib>`__

.. code-block:: cmake
hunter_add_package(ned14-internal-quickcpplib)
find_package(quickcpplib CONFIG REQUIRED)
target_link_libraries(... quickcpplib::hl)
QuickCppLib is an internal dependency automatically retrieved by Outcome
and LLFIO and is only present here to ensure exactly reproducible builds.
Do not use it in your own projects.
19 changes: 19 additions & 0 deletions examples/ned14-internal-quickcpplib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (c) 2021 Niall Douglas
# All rights reserved.

cmake_minimum_required(VERSION 3.0)

# Emulate HunterGate:
# * https://github.com/cpp-pm/gate
include("../common.cmake")

project(download-ned14-internal-quickcpplib)

hunter_add_package(ned14-internal-quickcpplib)
find_package(quickcpplib CONFIG REQUIRED)

add_executable(foo-static foo.cpp)
target_link_libraries(foo-static PUBLIC quickcpplib::hl)

add_executable(foo-shared foo.cpp)
target_link_libraries(foo-shared PUBLIC quickcpplib::hl)
9 changes: 9 additions & 0 deletions examples/ned14-internal-quickcpplib/foo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <quickcpplib/byte.hpp>
#include <quickcpplib/signal_guard.hpp>

int main() {
using namespace QUICKCPPLIB_NAMESPACE::signal_guard;
signal_guard_install i(signalc_set::segmentation_fault | signalc_set::cxx_termination);
(void) i;
return 0;
}

0 comments on commit 3a61066

Please sign in to comment.