forked from lasote/conan-hwloc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.py
45 lines (39 loc) · 2.27 KB
/
build.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
from conan.packager import ConanMultiPackager
import platform
import os
if __name__ == "__main__":
builder = ConanMultiPackager()#
if platform.system() == "Windows":
builder.add_common_builds(shared_option_name="hwloc:shared")
filtered_builds = []
for settings, options in builder.builds:
if settings["compiler"] == "Visual Studio" and settings["compiler.version"] == "14" and settings["compiler.runtime"].startswith("MD") and settings["arch"].startswith("x86"):
filtered_builds.append([settings, options])
builder.builds = filtered_builds
if platform.system() == "Linux":
channel = os.getenv("CONAN_ARCHS", "x86,x86_64,armv7,armv8").split(",")
builder.add({"arch": "x86", "build_type": "Release", "compiler": "gcc"})
builder.add({"arch": "x86_64", "build_type": "Release", "compiler": "gcc"})
builder.add({"arch": "x86", "build_type": "Debug", "compiler": "gcc"})
builder.add({"arch": "x86_64", "build_type": "Debug", "compiler": "gcc"})
#Adnroid
builder.add({"arch": "armv7", "os": "Android", "build_type": "Release", "compiler": "gcc"})
builder.add({"arch": "armv8", "os": "Android", "build_type": "Release", "compiler": "gcc"})
builder.add({"arch": "armv7", "os": "Android", "build_type": "Debug", "compiler": "gcc"})
builder.add({"arch": "armv8", "os": "Android", "build_type": "Debug", "compiler": "gcc"})
filtered_builds = []
for settings, options in builder.builds:
if settings["arch"] in channel:
filtered_builds.append([settings, options])
builder.builds = filtered_builds
if platform.system() == "Darwin":
builder.add({"arch": "x86", "build_type": "Release"})
builder.add({"arch": "x86_64", "build_type": "Release"})
builder.add({"arch": "x86", "build_type": "Debug"})
builder.add({"arch": "x86_64", "build_type": "Debug"})
#iOS
builder.add({"arch": "armv7", "os": "iOS", "build_type": "Release"})
builder.add({"arch": "armv8", "os": "iOS", "build_type": "Release"})
builder.add({"arch": "armv7", "os": "iOS", "build_type": "Debug"})
builder.add({"arch": "armv8", "os": "iOS", "build_type": "Debug"})
builder.run()