[go: up one dir, main page]

Menu

[c6b6b5]: / cmake / cygmex.sh  Maximize  Restore  History

Download this file

30 lines (22 with data), 621 Bytes

 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
#!/bin/bash
# This is a script of tricks to compile matlab interface with mex and Visual Studio when executed from cygwin
mexargs=""
for arg in $*; do
if [[ $arg == *"/"* ]]; then
if [[ $arg == "-I"* ]]; then
conv_arg="-I`cygpath -m ${arg:2}`"
elif [[ $arg == "-L"* ]]; then
conv_arg="-L`cygpath -m ${arg:2}`"
else
conv_arg=`cygpath -m $arg`
fi
else
conv_arg=$arg
fi
if [[ $conv_arg == *".cpp.o" ]]; then
conv_arg=`echo ${conv_arg%.cpp.o}.obj | sed 's/__\/pfs//g'`
fi
mexargs="$mexargs $conv_arg"
done
#echo "Running command: @MATLAB_MEX_EXE@ $mexargs"
@MATLAB_MEX_EXE@ $mexargs