-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.setup-xcode
executable file
·55 lines (43 loc) · 2.53 KB
/
.setup-xcode
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
#! /usr/bin/osascript
tell application "Xcode"
set myName to do shell script "whoami"
set targetProject to project of active project document
tell targetProject
set active build configuration type to build configuration type "RelWithDebInfo"
set mpiCoolfluidSolverFound to false
repeat with i from 1 to count of executables
if name of item i of executables is equal to "coolfluid-solver" then
set coolfluidSolver to item i of executables
end if
if name of item i of executables is equal to "mpi-coolfluid-solver" then
set mpiCoolfluidSolver to item i of executables
set mpiCoolfluidSolverFound to true
end if
end repeat
if mpiCoolfluidSolverFound is false then
set mpiCoolfluidSolver to (make new executable with properties {name:"mpi-coolfluid-solver", path:"/Users/" & myName & "/local/i386/bin/mpirun"})
end if
tell coolfluidSolver
delete launch arguments
delete environment variables
if ((count of launch arguments) is equal to 0) then
make new environment variable with properties {name:"LD_LIBRARY_PATH", value:"/Users/" & myName & "/local/i386/lib", active:true}
make new environment variable with properties {name:"DYLD_LIBRARY_PATH", value:"/Users/" & myName & "/local/i386/lib", active:true}
make new launch argument with properties {active:true, name:"--conf " & "/Users/" & myName & "/workspace/coolfluid/builds/i386/xcode/src/Solver/coolfluid-solver.xml"}
make new launch argument with properties {active:true, name:"--scase !!!cfcasefile!!!"}
end if
set startup directory to "!!!results_dir!!!"
end tell
tell mpiCoolfluidSolver
if ((count of launch arguments) is equal to 0) then
make new launch argument with properties {active:true, name:"-np 2"}
make new launch argument with properties {active:true, name:"/Users/" & myName & "/workspace/coolfluid/builds/i386/xcode/src/Solver/RelWithDebInfo/coolfluid-solver"}
make new launch argument with properties {active:true, name:"--conf " & "/Users/" & myName & "/workspace/coolfluid/builds/i386/xcode/src/Solver/coolfluid-solver.xml"}
make new launch argument with properties {active:true, name:"--scase !!!cfcasefile!!!"}
make new environment variable with properties {name:"LD_LIBRARY_PATH", value:"/Users/" & myName & "/local/i386/lib", active:true}
make new environment variable with properties {name:"DYLD_LIBRARY_PATH", value:"/Users/" & myName & "/local/i386/lib", active:true}
end if
set startup directory to "!!!results_dir!!!"
end tell
end tell
end tell