-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmex_CUDA_maci64.xml
91 lines (87 loc) · 3.6 KB
/
mex_CUDA_maci64.xml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2013 The MathWorks, Inc. -->
<config
Name="nvcc"
ShortName="nvcc"
Manufacturer="NVIDIA"
Version=""
Language="CUDA"
Priority="A"
Location="$NVCC" >
<Details
CompilerExecutable="$CXX"
CompilerDefines="$DEFINES"
CompilerFlags="$CXXFLAGS"
OptimizationFlags="$CXXOPTIMFLAGS"
DebugFlags="$CXXDEBUGFLAGS"
IncludeFlags="$INCLUDE"
LinkerLibraries="$LINKLIBS"
LinkerOptimizationFlags="$LDOPTIMFLAGS"
LinkerDebugFlags="$LDDEBUGFLAGS"
CompilerDefineFormatter="-D%s"
LinkerLibrarySwitchFormatter="-l%s"
LinkerPathFormatter="-L%s"
/>
<vars
CMDLINE1="$CXX -c $DEFINES $INCLUDE $NVCCFLAGS $CXXFLAGS $OPTIM $SRC -o $OBJ"
CMDLINE2="$LDXX $LDFLAGS $LINKOPTIM $LINKEXPORT $OBJS $CXXLIBS $LINKLIBS -o $EXE"
CMDLINE3="rm -f $OBJ"
CXX="$NVCC"
DEFINES="$MATLABMEX"
MATLABMEX="-DMATLAB_MEX_FILE"
NVCCFLAGS="-gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -m 64 $NVCC_FLAGS"
CXXFLAGS="--compiler-bindir=$CLANG_COMPILER --compiler-options=-fno-common,-arch,$ARCHS,-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET,-fexceptions,-fPIC,-fno-omit-frame-pointer,-pthread,-isysroot,$ISYSROOT"
INCLUDE="-I"$MATLABROOT/extern/include" -I"$MATLABROOT/simulink/include" -I"$MATLABROOT/toolbox/distcomp/gpu/extern/include/""
CXXOPTIMFLAGS="-O2 -DNDEBUG"
CXXDEBUGFLAGS="-g"
ARCHS="x86_64"
LDXX="$XCRUN_DIR/xcrun clang++"
LDFLAGS="-stdlib=libstdc++ -pthread -Wl,-twolevel_namespace -undefined error -arch $ARCHS -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -Wl,-syslibroot,$ISYSROOT $LDBUNDLE $LINKEXPORT"
LDBUNDLE="-bundle"
LINKEXPORT="-Wl,-exported_symbols_list,"$MATLABROOT/extern/lib/$ARCH/mexFunction.map""
LINKLIBS="-L"$MATLABROOT/bin/$ARCH" -lmx -lmex -lmat -lm -lmwgpu -lcudart"
LDOPTIMFLAGS="-O"
LDDEBUGFLAGS="-g"
OBJEXT=".o"
LDEXT=".mexmaci64"
MACOSX_DEPLOYMENT_TARGET='10.11'>
</vars>
<client>
</client>
<locationFinder>
<NVCC>
<or>
<and>
<envVarExists name="MW_NVCC_PATH" />
<dirExists name="$$" />
<fileExists name="$$/nvcc" />
</and>
<cmdReturns name="which nvcc" />
<fileExists name="/Developer/NVIDIA/CUDA-7.5/bin/nvcc" /> <!-- Default install location -->
<fileExists name="/usr/local/cuda/bin/nvcc" /> <!-- Recent CUDA versions symlink here -->
</or>
</NVCC>
<CLANG_COMPILER>
<or>
<envVarExists name="MW_XCODE_CLANG_COMPILER" />
<and>
<cmdReturns name="xcrun -f clang++" />
<dirExists name="$$" />
<fileExists name="$$/clang++" />
</and>
</or>
</CLANG_COMPILER>
<XCRUN_DIR>
<and>
<cmdReturns name="which xcrun" />
<dirExists name="$$" />
</and>
</XCRUN_DIR>
<ISYSROOT>
<and>
<cmdReturns name="xcrun --show-sdk-path"/>
<dirExists name="$$" />
</and>
</ISYSROOT>
</locationFinder>
</config>