-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
49 lines (41 loc) · 1.77 KB
/
conanfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from conans import ConanFile, CMake
class LSlabConan(ConanFile):
name = "lslab"
version = "3.0.0"
author = "dePaul Miller"
url = "https://github.com/depaulmillz/lslab"
license = "MIT"
settings={"os" : ["Linux"], "compiler" : None, "build_type" : None, "arch": ["x86_64"] }
build_requires="unifiedmemorygroupallocation/1.1"
generators="cmake_find_package"
description = """The LSlab GPU hashmap was designed in the paper
"KVCG: A Heterogeneous Key-Value Store for Skewed Workloads" by dePaul Miller,
Jacob Nelson, Ahmed Hassan, and Roberto Palmieri."
"""
topic = ("data structure", "gpu programming", "hashmap", "hashtable")
exports_sources = "CMakeLists.txt", "cmake/*", "benchmark/*", "include/*", "test/*", "LICENSE"
options = {"cuda_arch" : "ANY", "cuda_compiler" : "ANY"}
def configure(self):
if self.options.cuda_arch == None:
self.options.cuda_arch = '70;75;80;86;89;90'
if self.options.cuda_compiler == None:
self.options.cuda_compiler = "nvcc"
def _configure_cmake(self):
cmake = CMake(self)
cmake.definitions["CMAKE_CUDA_ARCHITECTURES"] = str(self.options.cuda_arch)
cmake.definitions["CMAKE_CUDA_COMPILER"] = str(self.options.cuda_compiler)
cmake.definitions["CMAKE_EXPORT_COMPILE_COMMANDS"] = "ON"
cmake.configure()
return cmake
def build(self):
cmake = self._configure_cmake()
cmake.build()
cmake.test()
def package(self):
cmake = self._configure_cmake()
cmake.install()
def package_id(self):
self.info.header_only()
def package_info(self):
self.cpp_info.names["cmake_find_package"] = "lslab"
self.cpp_info.names["cmake_find_package_multi"] = "lslab"