Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Pr.microsoft.gsl #1499

Merged
merged 8 commits into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ hunter_default_version(Libcxxabi VERSION 3.6.2) # Clang
hunter_default_version(Libevent VERSION 2.1.8-p4)
hunter_default_version(Libssh2 VERSION 1.7.0)
hunter_default_version(Lua VERSION 5.3.2-p2)
hunter_default_version(Microsoft.GSL VERSION 1.0.0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.0.0-p0

hunter_default_version(MySQL-client VERSION 6.1.9-p0)
hunter_default_version(NASM VERSION 2.12.02)
hunter_default_version(OpenAL VERSION 1.18.2)
Expand Down
31 changes: 31 additions & 0 deletions cmake/projects/Microsoft.GSL/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2016-2018, Ruslan Baratov
# 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)

hunter_add_version(
PACKAGE_NAME
Microsoft.GSL
VERSION
1.0.0-p0
URL
"https://github.com/hunter-packages/Microsoft.GSL/archive/v1.0.0-p0.tar.gz"
SHA1
3cc3b9f2f7e5cde7827b8793ab6b4a8717511c9a
)

hunter_cmake_args(
Microsoft.GSL
CMAKE_ARGS
GSL_TEST=OFF
)

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

Microsoft.GSL

.. index::
single: unsorted ; Microsoft.GSL

.. _pkg.Microsoft.GSL:

Microsoft.GSL
=============

- `Official <https://github.com/Microsoft/GSL>`__
- `Hunterized <https://github.com/hunter-packages/Microsoft.GSL/tree/hunter-1.0.0>`__
- `Example <https://github.com/ruslo/hunter/blob/master/examples/Microsoft.GSL/CMakeLists.txt>`__
- Added by `Stefan Reinhold <https://github.com/ithron>`__ (`pr-1499 <https://github.com/ruslo/hunter/pull/1499>`__)

.. literalinclude:: /../examples/Microsoft.GSL/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
18 changes: 18 additions & 0 deletions examples/Microsoft.GSL/CMakeLists.txt
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.0)

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

project(download-Microsoft.GSL)

# DOCUMENTATION_START {
hunter_add_package(Microsoft.GSL)
find_package(Microsoft.GSL CONFIG REQUIRED)

add_executable(boo boo.cpp)
target_link_libraries(boo PUBLIC Microsoft.GSL::GSL)
# DOCUMENTATION_END }
4 changes: 4 additions & 0 deletions examples/Microsoft.GSL/boo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include <gsl/gsl>

int main() {
}