-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconanfile.py
More file actions
47 lines (39 loc) · 1.62 KB
/
conanfile.py
File metadata and controls
47 lines (39 loc) · 1.62 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
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import copy, get
from conan.tools.layout import basic_layout
import os
class MexceConan(ConanFile):
name = "mexce"
version = "1.0.1"
license = "BSD-2-Clause"
homepage = "https://github.com/imakris/mexce"
url = "https://github.com/conan-io/conan-center-index"
description = "Single-header, dependency-free JIT compiler for scalar mathematical expressions."
topics = ("jit", "math", "expression-parser", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True
def layout(self):
basic_layout(self)
def validate(self):
allowed_architectures = {"x86", "x86_64"}
if str(self.settings.arch) not in allowed_architectures:
raise ConanInvalidConfiguration(
"mexce only supports x86 and x86_64 architectures")
def package_id(self):
self.info.clear()
def source(self):
get(self,
url=f"https://github.com/imakris/mexce/archive/refs/tags/v{self.version}.zip",
strip_root=True)
def package(self):
copy(self, "mexce.h", self.source_folder,
os.path.join(self.package_folder, "include"))
copy(self, "LICENSE*", self.source_folder,
os.path.join(self.package_folder, "licenses"))
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
self.cpp_info.set_property("cmake_file_name", "mexce")
self.cpp_info.set_property("cmake_target_name", "mexce::mexce")