Skip to content

Commit

Permalink
Fix cub recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Feb 23, 2024
1 parent 45eea1f commit 196cdc2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions third_party/conan-recipes/cub/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,20 @@ def validate(self):

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

@property
def _source_subfolder(self):
if Version(self.version) >= "2.0":
move_folder_contents(self, os.path.join(self.source_folder, "cub"), self.source_folder)
return os.path.join(self.source_folder, "cub")
return self.source_folder

def package(self):
copy(self, "LICENSE.TXT",
dst=os.path.join(self.package_folder, "licenses"),
src=self.source_folder)
src=self._source_subfolder)
copy(self, "*.cuh",
dst=os.path.join(self.package_folder, "include", "cub"),
src=os.path.join(self.source_folder, "cub"))
src=os.path.join(self._source_subfolder, "cub"))

def package_info(self):
self.cpp_info.bindirs = []
Expand Down

0 comments on commit 196cdc2

Please sign in to comment.