Repository navigation
Expand file tree
/
Copy pathconanfile.py
More file actions
77 lines (67 loc) · 2.47 KB
/
Copy pathconanfile.py
File metadata and controls
77 lines (67 loc) · 2.47 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
70
71
72
73
74
75
76
77
from conans import ConanFile
from conans.tools import download, unzip
from contextlib import contextmanager
import os
import platform
VERSION = "0.0.7"
def in_dir(directory):
try:
os.makedirs(directory)
except OSError:
pass
try:
old_dir = os.getcwd()
os.chdir(directory)
yield directory
finally:
os.chdir(old_dir)
class CommonUniversalCMakeCMakeConan(ConanFile):
name = "common-universal-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = (
"accelerate-target-cmake/master@smspillaz/accelerate-target-cmake",
"clang-tidy-target-cmake/master@smspillaz/clang-tidy-target-cmake",
"cmake-include-guard/master@smspillaz/cmake-include-guard",
"cmake-forward-arguments/master@smspillaz/cmake-forward-arguments",
"cppcheck-target-cmake/master@smspillaz/cppcheck-target-cmake",
"gmock-cmake/master@smspillaz/gmock-cmake",
"gcov-cmake/master@smspillaz/gcov-cmake",
"iwyu-target-cmake/master@smspillaz/iwyu-target-cmake",
"sanitize-target-cmake/master@smspillaz/sanitize-target-cmake",
"verapp-cmake/master@smspillaz/verapp-cmake"
)
options = {
"dev": [True, False]
}
default_options = "dev=False"
url = "http://github.com/polysquare/common-universal-cmake"
license = "MIT"
options = {
"dev": [True, False]
}
default_options = "dev=False"
def requirements(self):
if self.options.dev:
self.requires("cmake-module-common/master@smspillaz/cmake-module-common")
def source(self):
zip_name = "common-universal-cmake.zip"
download("https://github.com/polysquare/"
"common-universal-cmake/archive/{version}.zip"
"".format(version="v" + VERSION),
zip_name)
unzip(zip_name)
os.unlink(zip_name)
def package(self):
self.copy(pattern="*polysquare",
dst="cmake/common-universal-cmake",
src="common-universal-cmake-" + VERSION,
keep_path=True)
self.copy(pattern="*.tcl",
dst="cmake/common-universal-cmake",
src="common-universal-cmake-" + VERSION,
keep_path=True)
self.copy(pattern="*.cmake",
dst="cmake/common-universal-cmake",
src="common-universal-cmake-" + VERSION,
keep_path=True)