-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux_build.py
37 lines (24 loc) · 954 Bytes
/
linux_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
#!/usr/bin/python
import subprocess
import distutils.spawn
# technical
def launchProcess(executable, args, workingDir):
procObj = subprocess.Popen(executable + " " + args, cwd=workingDir, shell=True);
retval = procObj.wait();
def execExists(executable):
val = distutils.spawn.find_executable(executable);
return (val != None);
### check for necessary dependencies
if not (execExists("gcc") and execExists("g++")):
print "error: gcc or g++ are not detected in the system";
print "aborting build";
exit();
if not (execExists("msbuild") and execExists("mono")):
print "error: mono and/or msbuild are not detected in the system";
print "if you're sure mono is installed, restart the terminal window"
print "aborting build";
exit();
### build TestingFramework
launchProcess("msbuild", "TestingFramework.sln", "TestingFramework");
# All others
launchProcess("make", "all", "Algorithms/AlgoCollection");