-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmex_CUDA_win64.xml
More file actions
166 lines (162 loc) · 7.85 KB
/
Copy pathmex_CUDA_win64.xml
File metadata and controls
166 lines (162 loc) · 7.85 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2014 The MathWorks, Inc. -->
<!-- CUDA MEX options for MSVC 2013 -->
<config
Name="NVIDIA CUDA Compiler"
ShortName="nvcc"
Manufacturer="NVIDIA"
Version="6.5"
Language="CUDA"
Priority="A"
Location="$NVCC" >
<Details
CompilerExecutable="$COMPILER"
CompilerDefines="$COMPDEFINES"
CompilerFlags="$COMPFLAGS"
OptimizationFlags="$OPTIMFLAGS"
DebugFlags="$DEBUGFLAGS"
IncludeFlags="$INCLUDE"
LinkerExecutable="$LINKER"
LinkerFlags="$LINKFLAGS"
LinkerLibraries="$LINKLIBS"
LinkerDebugFlags="$LINKDEBUGFLAGS"
LinkerOptimizationFlags="$LINKOPTIMFLAGS"
CommandLineShell="$VCVARSALLDIR\VCVARSALL.BAT "
CommandLineShellArg="amd64"
CompilerDefineFormatter="--compiler-options=/D%s"
LinkerLibrarySwitchFormatter="lib%s.lib;%s.lib"
LinkerPathFormatter="/LIBPATH:%s"
LibrarySearchPath="$$LIB;$$LIBPATH;$$PATH;$$INCLUDE;$MATLABROOT\extern\lib\$ARCH\microsoft"
/>
<!-- Switch guide: http://msdn.microsoft.com/en-us/library/fwkeyyhe(v=vs.71).aspx -->
<vars
CMDLINE100="$COMPILER -c $COMPFLAGS $OPTIM $COMPDEFINES $INCLUDE $SRC -o $OBJ"
CMDLINE200="$LINKER $LINKFLAGS $LINKTYPE $LINKOPTIM $LINKEXPORT $OBJS $LINKLIBS /out:$EXE"
CMDLINE250="mt -outputresource:$EXE;2 -manifest $MANIFEST"
CMDLINE300="del $EXP $LIB $MANIFEST $ILK"
COMPILER="nvcc"
COMPFLAGS="--compiler-options=/Zp8,/GR,/W3,/EHs,/nologo,/MD $ARCHFLAGS"
ARCHFLAGS="-gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_50,code=\"sm_50,compute_50\""
COMPDEFINES="--compiler-options=/D_CRT_SECURE_NO_DEPRECATE,/D_SCL_SECURE_NO_DEPRECATE,/D_SECURE_SCL=0,$MATLABMEX"
MATLABMEX="/DMATLAB_MEX_FILE"
OPTIMFLAGS="--compiler-options=/O2,/Oy-,/DNDEBUG"
INCLUDE="-I"$MATLABROOT\extern\include" -I"$MATLABROOT\simulink\include""
DEBUGFLAGS="--compiler-options=/Z7 -g"
LINKER="link"
LINKFLAGS="/nologo /manifest "
LINKTYPE="/DLL"
LINKEXPORT="/EXPORT:mexFunction"
LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib gpu.lib cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME$LDEXT.pdb""
LINKOPTIMFLAGS=""
OBJEXT=".obj"
LDEXT=".mexw64"
SETENV="set COMPILER=$COMPILER
set COMPFLAGS=/c $COMPFLAGS $COMPDEFINES $MATLABMEX
set OPTIMFLAGS=$OPTIMFLAGS
set DEBUGFLAGS=$DEBUGFLAGS
set LINKER=$LINKER
set LINKFLAGS=$LINKFLAGS /export:%ENTRYPOINT% $LINKTYPE $LINKLIBS $LINKEXPORT
set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%$LDEXT.pdb"
set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%""
/>
<locationFinder>
<VCROOT>
<and>
<or>
<hklmExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hkcuExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
</or>
<fileExists name="$$\VC\bin\amd64\cl.exe" />
<dirExists name="$$\..\.." />
</and>
</VCROOT>
<SDKROOT>
<or>
<hklmExists path="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1" name="InstallationFolder" />
<hkcuExists path="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1" name="InstallationFolder" />
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1" name="InstallationFolder" />
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1" name="InstallationFolder" />
</or>
</SDKROOT>
<VSINSTALLDIR>
<or>
<hklmExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hkcuExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
</or>
</VSINSTALLDIR>
<VCINSTALLDIR>
<or>
<hklmExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VC7" name="12.0" />
<hkcuExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VC7" name="12.0" />
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" name="12.0" />
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" name="12.0" />
</or>
</VCINSTALLDIR>
<PROF_ENV>
<and>
<envVarExists name="VS120COMNTOOLS" />
<fileExists name="$$\..\IDE\devenv.exe" />
</and>
</PROF_ENV>
<VCVARSALLDIR>
<and>
<or>
<hklmExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hkcuExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="12.0" />
</or>
<fileExists name="$$\VC\vcvarsall.bat" />
<dirExists name="$$"/>
</and>
</VCVARSALLDIR>
<CUDA_LIB_PATH>
<or>
<and>
<envVarExists name="CUDA_LIB_PATH"/>
<fileExists name="$$\cudart.lib" />
<dirExists name="$$" />
</and>
<and>
<envVarExists name="CUDA_PATH"/>
<fileExists name="$$\lib\x64\cudart.lib" />
<dirExists name="$$" />
</and>
</or>
</CUDA_LIB_PATH>
<CUDA_BIN_PATH>
<or>
<and>
<envVarExists name="CUDA_BIN_PATH"/>
<fileExists name="$$\nvcc.exe" />
<dirExists name="$$" />
</and>
<and>
<envVarExists name="CUDA_PATH"/>
<fileExists name="$$\bin\nvcc.exe" />
<dirExists name="$$" />
</and>
<and>
<envVarExists name="MW_NVCC_PATH"/>
<fileExists name="$$\nvcc.exe" />
<dirExists name="$$" />
</and>
<and>
<fileExists name="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\bin\nvcc.exe" />
<dirExists name="$$" />
</and>
</or>
</CUDA_BIN_PATH>
</locationFinder>
<env
PATH="$CUDA_BIN_PATH;$VCROOT\Bin\amd64;$VCROOT\Bin\VCPackages;$VCROOT\..\Common7\IDE;$VCROOT\..\Common7\Tools;$SDKROOT\Bin\x64;$SDKROOT\Bin\x86;"
INCLUDE="$VCROOT\INCLUDE;$VCROOT\ATLMFC\INCLUDE;$SDKROOT\include\shared;$SDKROOT\include\um;$SDKROOT\include\winrt;$MATLABROOT\extern\include;$MATLABROOT\toolbox\distcomp\gpu\extern\include"
LIB="$VCROOT\Lib\amd64;$VCROOT\ATLMFC\Lib\amd64;$SDKROOT\lib\winv6.3\um\x64;$MATLABROOT\lib\$ARCH;$CUDA_LIB_PATH"
LIBPATH="$VCROOT\Lib\amd64;$VCROOT\ATLMFC\Lib\amd64"
/>
</config>