-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.py
More file actions
39 lines (35 loc) · 1.64 KB
/
Copy pathbuild.py
File metadata and controls
39 lines (35 loc) · 1.64 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
import os
import platform
import shutil
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception(f"Failed CMD: {cmd}")
# remove things and define editables
run("conan remove test*/* -c")
run("conan editable remove --refs test*")
run("conan editable add alpha")
run("conan editable add beta")
shutil.rmtree(os.path.join("alpha", "build"), ignore_errors=True)
shutil.rmtree(os.path.join("beta", "build"), ignore_errors=True)
shutil.rmtree(os.path.join("gamma", "build"), ignore_errors=True)
try:
os.remove(os.path.join("alpha", "CMakeUserPresets.json"))
except FileNotFoundError as e:
pass
try:
os.remove(os.path.join("beta", "CMakeUserPresets.json"))
except FileNotFoundError as e:
pass
try:
os.remove(os.path.join("gamma", "CMakeUserPresets.json"))
except FileNotFoundError as e:
pass
if platform.system() == "Windows":
run(f"conan build --profile:build ./profiles/msvc --profile:host ./profiles/Windows-x86_64-msvc-194 alpha --build=missing --remote conancenter")
run(f"conan build --profile:build ./profiles/msvc --profile:host ./profiles/Windows-x86_64-msvc-194 beta --no-remote")
run(f"conan build --profile:build ./profiles/msvc --profile:host ./profiles/Windows-x86_64-msvc-194 gamma --no-remote")
else:
run(f"conan build --profile:build ./profiles/clang --profile:host ./profiles/Linux-x86_64-clang alpha -o '&:shared=True' --build=missing --remote conancenter")
run(f"conan build --profile:build ./profiles/clang --profile:host ./profiles/Linux-x86_64-clang beta --no-remote")
run(f"conan build --profile:build ./profiles/clang --profile:host ./profiles/Linux-x86_64-clang gamma --no-remote")