|
1 | 1 | function(download_pybind11) |
2 | | - if(CMAKE_VERSION VERSION_LESS 3.11) |
3 | | - list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) |
4 | | - endif() |
5 | 2 |
|
6 | 3 | include(FetchContent) |
7 | 4 |
|
8 | | - # latest commit as of 2022.10.31 that supports python 3.11 |
9 | | - set(pybind11_URL "https://github.com/pybind/pybind11/archive/5bc0943ed96836f46489f53961f6c438d2935357.zip") |
10 | | - set(pybind11_URL2 "https://huggingface.co/csukuangfj/k2-cmake-deps/resolve/main/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip") |
11 | | - set(pybind11_HASH "SHA256=ff65a1a8c9e6ceec11e7ed9d296f2e22a63e9ff0c4264b3af29c72b4f18f25a0") |
| 5 | + set(pybind11_URL "https://github.com/pybind/pybind11/archive/refs/tags/v2.11.1.zip") |
| 6 | + set(pybind11_HASH "SHA256=b011a730c8845bfc265f0f81ee4e5e9e1d354df390836d2a25880e123d021f89") |
12 | 7 |
|
13 | 8 | # If you don't have access to the Internet, |
14 | 9 | # please pre-download pybind11 |
15 | 10 | set(possible_file_locations |
16 | | - $ENV{HOME}/Downloads/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip |
17 | | - ${PROJECT_SOURCE_DIR}/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip |
18 | | - ${PROJECT_BINARY_DIR}/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip |
19 | | - /tmp/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip |
20 | | - /star-fj/fangjun/download/github/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip |
| 11 | + $ENV{HOME}/Downloads/pybind11-2.11.1.tar.gz |
| 12 | + ${PROJECT_SOURCE_DIR}/pybind11-2.11.1.tar.gz |
| 13 | + ${PROJECT_BINARY_DIR}/pybind11-2.11.1.tar.gz |
| 14 | + /tmp/pybind11-2.11.1.tar.gz |
21 | 15 | ) |
22 | 16 |
|
23 | 17 | foreach(f IN LISTS possible_file_locations) |
24 | 18 | if(EXISTS ${f}) |
25 | 19 | set(pybind11_URL "${f}") |
26 | 20 | file(TO_CMAKE_PATH "${pybind11_URL}" pybind11_URL) |
27 | | - set(pybind11_URL2) |
28 | 21 | break() |
29 | 22 | endif() |
30 | 23 | endforeach() |
31 | 24 |
|
32 | 25 | FetchContent_Declare(pybind11 |
33 | 26 | URL |
34 | 27 | ${pybind11_URL} |
35 | | - ${pybind11_URL2} |
36 | 28 | URL_HASH ${pybind11_HASH} |
37 | 29 | ) |
38 | 30 |
|
|
0 commit comments