-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathconanfile.py
More file actions
69 lines (63 loc) · 2.35 KB
/
conanfile.py
File metadata and controls
69 lines (63 loc) · 2.35 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from conan import ConanFile
from conan.tools.cmake import cmake_layout
from conan.tools.cmake.toolchain.toolchain import CMakeToolchain
import os
class Pkg(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps"
default_options = {
"systemc/*:shared": "True",
"boost/*:fPIC": "True",
"boost/*:header_only": "False",
"boost/*:without_contract": "True",
"boost/*:without_fiber": "True",
"boost/*:without_graph": "True",
"boost/*:without_graph_parallel": "True",
"boost/*:without_iostreams": "True",
"boost/*:without_json": "True",
"boost/*:without_locale": "True",
"boost/*:without_log": "True",
"boost/*:without_math": "True",
"boost/*:without_mpi": "True",
"boost/*:without_nowide": "True",
"boost/*:without_python": "True",
"boost/*:without_random": "True",
"boost/*:without_regex": "True",
"boost/*:without_stacktrace": "False",
"boost/*:without_test": "True",
"boost/*:without_timer": "True",
"boost/*:without_type_erasure": "True",
"boost/*:without_wave": "True",
}
def requirements(self):
if self.settings.compiler.cppstd:
cppstd = str(self.settings.compiler.cppstd).replace("gnu", "")
if cppstd == "11" or cppstd == "14":
self.requires("systemc/2.3.4")
else:
self.requires("systemc/3.0.1")
else:
self.requires("systemc/2.3.4")
self.requires("spdlog/1.16.0")
self.requires("boost/1.89.0")
self.requires("lz4/1.10.0")
self.requires("yaml-cpp/0.8.0")
self.requires("jsoncpp/1.9.6")
self.requires("zlib/1.3.1")
self.requires("catch2/3.11.0")
self.requires("bzip2/1.0.8")
self.requires("zstd/1.5.7")
self.requires("xz_utils/5.8.1")
def build_requirements(self):
if self.settings.compiler.cppstd:
cppstd = str(self.settings.compiler.cppstd).replace("gnu", "")
if int(cppstd) > 14:
self.tool_requires("doxygen/1.15.0")
else:
self.tool_requires("doxygen/1.15.0")
def layout(self):
cmake_layout(self)
def generate(self):
tc = CMakeToolchain(self)
tc.user_presets_path = False
tc.generate()