Skip to content

Commit

Permalink
cuda-api-wrappers: add with versions 0.7.1 and 0.8.0 (#26256)
Browse files Browse the repository at this point in the history
* Updated cuda-api-wrappers recipe:

* Removed 0.7 beta versions
* Added versions 0.7.0, 0.7.1 and 0.8.0
* Now specifying the correct exported target name in the main `conanfile.py`
* Now using the correct the target name in the test package's `CMakeLists.txt`

* cuda-api-wrappers: retain old target name for backwards compatibility

---------

Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com>
  • Loading branch information
eyalroz and jcar87 authored Jan 2, 2025
1 parent 7d216f1 commit fd51b6f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
15 changes: 9 additions & 6 deletions recipes/cuda-api-wrappers/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
sources:
"0.7.0-b2":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.7.0-b2.tar.gz"
sha256: "9439cb2250dd3045a05d43c4ca66b5d49535eeba123b05a2e49169354fdb3123"
"0.7-b1":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/0.7b1.tar.gz"
sha256: "1ed5912d8f602ccd176865b824de17f462cb57142eb2a685d7cc034831e54a71"
"0.8.0":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.8.0.tar.gz"
sha256: "16c68e450e553d2839f00503a44e85b32c4f4e08f154e9f7c85f706bc5c79bf3"
"0.7.1":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.7.1.tar.gz"
sha256: "fa30c9fe43a62f5a3fd82a5deb477838fbf0bf455c73a2d2bb5ab6284184900b"
"0.7.0":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.7.0.tar.gz"
sha256: "a47d11607ffa0c41cfffe689840a14125520da3f4bb504267e9d232ebb846457"
"0.6.8":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.6.8.tar.gz"
sha256: "a0d1b062dbe41c99d06df4ae7885a053c2ae3815d6fe12df0458bc5277d08ed7"
Expand Down
6 changes: 5 additions & 1 deletion recipes/cuda-api-wrappers/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from conan import ConanFile
from conan.tools.files import get, copy
from conan.tools.layout import basic_layout
from conan.tools.scm import Version

required_conan_version = ">=1.52.0"

Expand Down Expand Up @@ -44,6 +45,9 @@ def package(self):
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []

self.cpp_info.set_property("cmake_target_name", "cuda-api-wrappers::runtime-and-driver")
if Version(self.version) < "0.7.0":
# For previously published versions the target name was different, maintain compatibility
self.cpp_info.set_property("cmake_target_aliases", ["cuda-api-wrappers::cuda-api-wrappers"])
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.system_libs = ["pthread"]
2 changes: 1 addition & 1 deletion recipes/cuda-api-wrappers/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(test_package LANGUAGES CXX)
find_package(cuda-api-wrappers REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE cuda-api-wrappers::cuda-api-wrappers)
target_link_libraries(${PROJECT_NAME} PRIVATE cuda-api-wrappers::runtime-and-driver)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
target_compile_definitions(${PROJECT_NAME} PRIVATE
CUDA_API_WRAPPERS_VERSION=\"${cuda-api-wrappers_VERSION_STRING}\")
6 changes: 4 additions & 2 deletions recipes/cuda-api-wrappers/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
versions:
"0.7.0-b2":
"0.8.0":
folder: all
"0.7-b1":
"0.7.1":
folder: all
"0.7.0":
folder: all
"0.6.8":
folder: all
Expand Down

0 comments on commit fd51b6f

Please sign in to comment.