-
Notifications
You must be signed in to change notification settings - Fork 2
/
conanfile.py
65 lines (53 loc) · 1.86 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import os
from conan import ConanFile
from conan.tools.files import copy
from conan.tools.cmake import cmake_layout, CMake
from conan.tools.build import check_min_cppstd
class MelonConan(ConanFile):
name = "melon"
version = "1.0.0-alpha.1"
license = "BSL-1.0"
description = (
"A modern and efficient graph library using C++20 ranges and concepts."
)
homepage = "https://github.com/fhamonic/melon"
url = "https://github.com/fhamonic/melon.git"
settings = "os", "arch", "compiler", "build_type"
exports_sources = "include/*", "LICENSE", "test/*"
no_copy_source = True
generators = "CMakeToolchain", "CMakeDeps"
def requirements(self):
self.requires("range-v3/0.12.0", transitive_headers=True)
self.requires("fmt/[>=10.0.0]", transitive_headers=True)
self.test_requires("gtest/[>=1.10.0 <cci]")
self.test_requires("boost/1.85.0")
self.test_requires("gmp/6.3.0")
self.test_requires("mppp/1.0.3")
def validate(self):
check_min_cppstd(self, 20)
def layout(self):
cmake_layout(self)
def build(self):
if not self.conf.get("tools.build:skip_test", default=False):
cmake = CMake(self)
cmake.configure(build_script_folder="test")
cmake.build()
self.run(os.path.join(self.cpp.build.bindir, "melon_test"))
def package(self):
copy(
self,
"LICENSE",
self.source_folder,
os.path.join(self.package_folder, "licenses"),
)
copy(
self,
"*.hpp",
os.path.join(self.source_folder, "include"),
os.path.join(self.package_folder, "include"),
)
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
def package_id(self):
self.info.clear()