Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" ?>
- <!-- Copyright 2016 The MathWorks, Inc. -->
- <!-- CUDA MEX options for MSVC 2015 -->
- <config
- Name="NVIDIA CUDA Compiler"
- ShortName="nvcc"
- HostCompiler="MSVCPP140"
- Manufacturer="NVIDIA"
- Version="8.0"
- Language="CUDA"
- Priority="A"
- Location="$NVCC" >
- <Details
- CompilerExecutable="$COMPILER"
- CompilerDefines="$COMPDEFINES"
- CompilerFlags="$COMPFLAGS"
- OptimizationFlags="$OPTIMFLAGS"
- DebugFlags="$DEBUGFLAGS"
- IncludeFlags="$INCLUDE"
- LinkerExecutable="$LINKER"
- LinkerFlags="$LINKFLAGS $LINKTYPE"
- 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 -->
- <!-- Note: "&& echo XXXX > NUL" on CMDLINE is ignored by OS and is present to help MEX identify compile and link stages -->
- <vars
- CMDLINE100="$COMPILER -c $COMPFLAGS $OPTIM $COMPDEFINES $INCLUDE $SRC -o $OBJ && echo /Fo > NUL"
- CMDLINE200="$LINKER $LINKFLAGS $LINKTYPE $LINKOPTIM $LINKEXPORTVER $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_20,code=sm_20 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=\"sm_60,compute_60\" $NVCC_FLAGS"
- 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"
- LINKER="link"
- LINKFLAGS="/nologo /manifest "
- LINKTYPE="/DLL"
- LINKEXPORT="/EXPORT:mexFunction"
- LINKEXPORTVER="/EXPORT:mexFunction /EXPORT:mexfilerequiredapiversion"
- 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="14.0" />
- <hkcuExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- <hklmExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- <hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="14.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="14.0" />
- <hkcuExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- <hklmExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- <hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- </or>
- </VSINSTALLDIR>
- <VCINSTALLDIR>
- <or>
- <hklmExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VC7" name="14.0" />
- <hkcuExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VC7" name="14.0" />
- <hklmExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" name="14.0" />
- <hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" name="14.0" />
- </or>
- </VCINSTALLDIR>
- <PROF_ENV>
- <and>
- <envVarExists name="VS140COMNTOOLS" />
- <fileExists name="$$\..\IDE\devenv.exe" />
- </and>
- </PROF_ENV>
- <VCVARSALLDIR>
- <and>
- <or>
- <hklmExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- <hkcuExists path="SOFTWARE\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- <hklmExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- <hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" name="14.0" />
- </or>
- <fileExists name="$$\VC\vcvarsall.bat" />
- <dirExists name="$$"/>
- </and>
- </VCVARSALLDIR>
- <KITSROOT>
- <or>
- <hklmExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" />
- <hkcuExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" />
- <hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" />
- <hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" />
- </or>
- </KITSROOT>
- <CUDA_LIB_PATH diagnostic="No CUDA toolkit installation could be found. If installed, set MW_NVCC_PATH environment variable to location of nvcc compiler." >
- <and>
- <or>
- <and>
- <envVarExists name="MW_NVCC_PATH"/>
- <fileExists name="$$\..\lib\x64\cudart.lib" />
- </and>
- <and>
- <envVarExists name="CUDA_LIB_PATH"/>
- <fileExists name="$$\cudart.lib" />
- </and>
- <and>
- <envVarExists name="CUDA_PATH"/>
- <fileExists name="$$\lib\x64\cudart.lib" />
- </and>
- <and>
- <fileExists name="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64\cudart.lib" />
- </and>
- </or>
- <dirExists name="$$" />
- </and>
- </CUDA_LIB_PATH>
- <CUDA_BIN_PATH diagnostic="Version 8.0 of the CUDA toolkit could not be found. If installed, set MW_NVCC_PATH environment variable to location of nvcc compiler." >
- <or>
- <!-- This section is for UNC paths. We can only execute nvcc --version with no quotes around a UNC path -->
- <and>
- <or>
- <and>
- <envVarExists name="MW_NVCC_PATH"/>
- <fileExists name="$$\nvcc.exe" />
- </and>
- <and>
- <envVarExists name="CUDA_BIN_PATH"/>
- <fileExists name="$$\nvcc.exe" />
- </and>
- <and>
- <envVarExists name="CUDA_PATH"/>
- <fileExists name="$$\bin\nvcc.exe" />
- </and>
- <and>
- <fileExists name="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe" />
- </and>
- </or>
- <!-- cmdReturns will replace all backslashes with a single backslash unless they are the very first characters -->
- <cmdReturns name="$$\nvcc --version | findstr /c:"release 8.0" > NUL && echo $$" />
- </and>
- <!-- For local paths, duplicate the same syntax in order to execute nvcc --version with quotes around the path, to handle spaces -->
- <and>
- <or>
- <and>
- <envVarExists name="MW_NVCC_PATH"/>
- <fileExists name="$$\nvcc.exe" />
- </and>
- <and>
- <envVarExists name="CUDA_BIN_PATH"/>
- <fileExists name="$$\nvcc.exe" />
- </and>
- <and>
- <envVarExists name="CUDA_PATH"/>
- <fileExists name="$$\bin\nvcc.exe" />
- </and>
- <and>
- <fileExists name="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe" />
- </and>
- </or>
- <cmdReturns name=""$$\nvcc" --version | findstr /c:"release 8.0" > NUL && echo $$" />
- </and>
- </or>
- </CUDA_BIN_PATH>
- </locationFinder>
- <env
- PATH="\$CUDA_BIN_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;$KITSROOT\include\10.0.10150.0\ucrt;$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;$KITSROOT\Lib\10.0.10150.0\ucrt\x64;$SDKROOT\lib\winv6.3\um\x64;$MATLABROOT\lib\$ARCH;$CUDA_LIB_PATH"
- LIBPATH="$VCROOT\Lib\amd64;$VCROOT\ATLMFC\Lib\amd64"
- />
- </config>
Advertisement
Add Comment
Please, Sign In to add comment