Skip to content

Commit 0de3cca

Browse files
authored
Add package pthreads-win32 v2.9.1-7ad2af7-p0 (#449)
* Add package pthreads-win32 * Fix include
1 parent d929cdc commit 0de3cca

File tree

6 files changed

+76
-0
lines changed

6 files changed

+76
-0
lines changed

cmake/configs/default.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ hunter_default_version(presentproto VERSION 1.0)
449449
hunter_default_version(prometheus-cpp VERSION 0.6.0-p2)
450450
hunter_default_version(protobuf-c VERSION 1.3.0-p1)
451451
hunter_default_version(pthread-stubs VERSION 0.4)
452+
hunter_default_version(pthreads-win32 VERSION 2.9.1-7ad2af7-p0)
452453
hunter_default_version(pugixml VERSION 1.10-p0)
453454
hunter_default_version(pybind11 VERSION 2.7.0)
454455
hunter_default_version(qhull VERSION 7.2.0-p1)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{ "example": "pthreads-win32", "toolchain": "ninja-vs-15-2017-win64-cxx17", "os": "windows-2016", "python": "3.8", "script": "build.cmd" },
3+
{ "example": "pthreads-win32", "toolchain": "nmake-vs-15-2017-win64-cxx17", "os": "windows-2016", "python": "3.8", "script": "build.cmd" },
4+
{ "example": "pthreads-win32", "toolchain": "vs-16-2019-win64-sdk-10-0-18362-0-cxx17", "os": "windows-2019", "python": "3.8", "script": "build.cmd" },
5+
{ "example": "pthreads-win32", "toolchain": "vs-15-2017-win64-cxx17", "os": "windows-2016", "python": "3.8", "script": "build.cmd" },
6+
{ "example": "pthreads-win32", "toolchain": "vs-14-2015-sdk-8-1", "os": "windows-2016", "python": "3.8", "script": "build.cmd" }
7+
]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2016-2020, Rahul Sheth, Ruslan Baratov
2+
# All rights reserved.
3+
4+
# !!! DO NOT PLACE HEADER GUARDS HERE !!!
5+
6+
include(hunter_add_version)
7+
include(hunter_cacheable)
8+
include(hunter_download)
9+
include(hunter_pick_scheme)
10+
11+
hunter_add_version(
12+
PACKAGE_NAME
13+
pthreads-win32
14+
VERSION
15+
2.9.1-7ad2af7-p0
16+
URL
17+
"https://github.com/cpp-pm/pthreads-win32/archive/refs/tags/v2.9.1-7ad2af7-p0.tar.gz"
18+
SHA1
19+
4d07ba41c074f4b35bce97a45ddee4856c4f7907
20+
)
21+
22+
hunter_pick_scheme(DEFAULT url_sha1_cmake)
23+
hunter_cacheable(pthreads-win32)
24+
hunter_download(PACKAGE_NAME pthreads-win32)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. spelling::
2+
3+
pthreads
4+
win32
5+
6+
.. index::
7+
single: unsorted ; pthreads-win32
8+
9+
.. _pkg.pthreads-win32:
10+
11+
pthreads-win32
12+
==============
13+
14+
- `Official <https://github.com/ziyht/pthreads-win32>`__
15+
- `Hunterized <https://github.com/cpp-pm/pthreads-win32>`__
16+
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/pthreads-win32/CMakeLists.txt>`__
17+
- Added by `Rahul Sheth <https://github.com/rbsheth>`__ (`pr-449 <https://github.com/cpp-pm/hunter/pull/449>`__)
18+
19+
.. literalinclude:: /../examples/pthreads-win32/CMakeLists.txt
20+
:language: cmake
21+
:start-after: # DOCUMENTATION_START {
22+
:end-before: # DOCUMENTATION_END }
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (c) 2016-2020, Rahul Sheth, Ruslan Baratov
2+
# All rights reserved.
3+
4+
cmake_minimum_required(VERSION 3.2)
5+
6+
# Emulate HunterGate:
7+
# * https://github.com/hunter-packages/gate
8+
include("../common.cmake")
9+
10+
project(download-pthreads-win32)
11+
12+
# DOCUMENTATION_START {
13+
hunter_add_package(pthreads-win32)
14+
find_package(pthreads-win32 CONFIG REQUIRED)
15+
16+
add_executable(boo boo.cpp)
17+
target_link_libraries(boo PUBLIC pthreads-win32::pthreads)
18+
# DOCUMENTATION_END }

examples/pthreads-win32/boo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#include <pthread.h>
2+
3+
int main() {
4+
}

0 commit comments

Comments
 (0)