yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1#ifndef SLANG_VISUAL_STUDIO_COMPILER_UTIL_H 2#define SLANG_VISUAL_STUDIO_COMPILER_UTIL_H 3 4#include "slang-downstream-compiler-util.h" 5 6namespace Slang 7{ 8 9 10struct VisualStudioCompilerUtil :public DownstreamCompilerUtilBase 11{ 12/// Calculate Visual Studio family compilers cmdLine arguments from options 13static SlangResult calcArgs (const CompileOptions & options ,CommandLine & cmdLine ); 14/// Parse Visual Studio exeRes into CPPCompiler::Output 15static SlangResult parseOutput (const ExecuteResult & exeRes ,IArtifactDiagnostics * outOutput ); 16 17static SlangResult calcCompileProducts ( 18const CompileOptions & options , 19ProductFlags flags , 20IOSFileArtifactRepresentation * lockFile , 21List < ComPtr < IArtifact >>& outArtifacts ); 22 23static SlangResult locateCompilers ( 24const String & path , 25ISlangSharedLibraryLoader * loader , 26DownstreamCompilerSet * set ); 27}; 28 29class VisualStudioDownstreamCompiler :public CommandLineDownstreamCompiler 30{ 31public : 32typedef CommandLineDownstreamCompiler Super ; 33typedef VisualStudioCompilerUtil Util ; 34 35// CommandLineDownstreamCompiler impl - just forwards to the Util 36virtual SlangResult calcArgs (const CompileOptions & options ,CommandLine & cmdLine )SLANG_OVERRIDE 37 { 38return Util ::calcArgs (options ,cmdLine ); 39 } 40virtual SlangResult parseOutput ( 41const ExecuteResult & exeResult , 42IArtifactDiagnostics * diagnostics )SLANG_OVERRIDE 43 { 44return Util ::parseOutput (exeResult ,diagnostics ); 45 } 46virtual SlangResult calcCompileProducts ( 47const CompileOptions & options , 48DownstreamProductFlags productFlags , 49IOSFileArtifactRepresentation * lockFile , 50List < ComPtr < IArtifact >>& outArtifacts )SLANG_OVERRIDE 51 { 52return Util ::calcCompileProducts (options ,productFlags ,lockFile ,outArtifacts ); 53 } 54 55VisualStudioDownstreamCompiler (const Desc & desc ) 56 :Super (desc ) 57 { 58 } 59}; 60 61 62}// namespace Slang 63 64#endif