Код: Выделить всё
include(FetchContent)
FetchContent_Declare(
cuda-api-wrappers
URL ${CMAKE_CURRENT_SOURCE_DIR}/third_party/cuda-api-wrappers-0.8.0-rc1.tar.gz,
URL_HASH MD5=463d41c3777115ecf3375d8f45c10d92
OVERRIDE_FIND_PACKAGE
)
find_package(cuda-api-wrappers REQUIRED)
Код: Выделить всё
cmake -E tar "xvf" cuda-api-wrappers-0.8.0-rc1.tar.gz
Код: Выделить всё
CMake Error at /opt/versions/cmake/3.28.3/share/cmake-3.28/Modules/ExternalProject.cmake:1672 (message):
Do not know how to extract
'/home/joeuser/foo/third_party/cuda-api-wrappers-0.8.0-rc1.tar.gz,'
-- known types are: .7z, .tar, .tar.bz2, .tar.gz, .tar.xz, .tbz2, .tgz,
.txz and .zip
Call Stack (most recent call first):
/opt/versions/cmake/3.28.3/share/cmake-3.28/Modules/ExternalProject.cmake:3219 (_ep_write_extractfile_script)
/opt/versions/cmake/3.28.3/share/cmake-3.28/Modules/ExternalProject.cmake:4418 (_ep_add_download_command)
CMakeLists.txt:21 (ExternalProject_Add)
-- Configuring incomplete, errors occurred!
CMake Error at /opt/versions/cmake/3.28.3/share/cmake-3.28/Modules/FetchContent.cmake:1667 (message):
CMake step for cuda-api-wrappers failed: 1
Call Stack (most recent call first):
/opt/versions/cmake/3.28.3/share/cmake-3.28/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
/opt/versions/cmake/3.28.3/share/cmake-3.28/Modules/FetchContent.cmake:1819 (cmake_language)
/opt/versions/cmake/3.28.3/share/cmake-3.28/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
CMakeLists.txt
CMakeLists.txt:39 (find_package)
Изменить: Пробовал это с CMake 3.31.2, такое же поведение.
Подробнее здесь: https://stackoverflow.com/questions/792 ... ar-gz-file
Мобильная версия