summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/core/slang-nvrtc-compiler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/core/slang-nvrtc-compiler.cpp b/source/core/slang-nvrtc-compiler.cpp
index 6464592a5..f68c4dc01 100644
--- a/source/core/slang-nvrtc-compiler.cpp
+++ b/source/core/slang-nvrtc-compiler.cpp
@@ -297,8 +297,16 @@ SlangResult NVRTCDownstreamCompiler::compile(const CompileOptions& options, RefP
cmdLine.addArg(include);
}
+ // Neither of these options are strictly required, for general use of nvrtc,
+ // but are enabled to make use withing Slang work more smoothly
{
+ // Require c++14, as makes initialization construction with {} available and so simplifies code generation
cmdLine.addArg("-std=c++14");
+
+ // Disable all warnings
+ // This is arguably too much - but nvrtc does not appear to have a mechanism to switch off individual warnings.
+ // I tried the -Xcudafe mechanism but that does not appear to work for nvrtc
+ cmdLine.addArg("-w");
}
nvrtcProgram program = nullptr;