-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.py
executable file
·40 lines (32 loc) · 1.54 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
import os
import platform
import sys
from subprocess import Popen, PIPE
if __name__ == "__main__":
os.system('conan export mathieu/stable')
def test(settings):
argv = " ".join(sys.argv[1:])
command = "conan test %s %s" % (settings, argv)
retcode = os.system(command)
if retcode != 0:
exit("Error while executing:\n\t conan %s" % args)
if platform.system() == "Windows":
compiler = '-s compiler="Visual Studio" -s compiler.version=14 '
# Static x86
test(compiler + '-s arch=x86 -s build_type=Debug -s compiler.runtime=MDd ')
test(compiler + '-s arch=x86 -s build_type=Release -s compiler.runtime=MD ')
# Static x86_64
test(compiler + '-s arch=x86_64 -s build_type=Debug -s compiler.runtime=MDd ')
test(compiler + '-s arch=x86_64 -s build_type=Release -s compiler.runtime=MD ')
else: # Compiler and version not specified, please set it in your home/.conan/conan.conf (Valid for Macos and Linux)
# if not os.getenv("TRAVIS", False):
# # Static x86
# test('-s arch=x86 -s build_type=Debug -o libjpeg:shared=False')
# test('-s arch=x86 -s build_type=Release -o libjpeg:shared=False')
#
# # Shared x86
# test('-s arch=x86 -s build_type=Debug -o libjpeg:shared=True')
# test('-s arch=x86 -s build_type=Release -o libjpeg:shared=True')
# Static x86_64
test('-s arch=x86_64 -s build_type=Debuge ')
test('-s arch=x86_64 -s build_type=Release ')