From 7222b6cdb1ed192b267e91896b1f56da3f0c21d6 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 15 Nov 2022 14:38:25 -0500 Subject: Specify downstream compiler include paths (#2517) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP around testing with NVAPI. * Make -I work for downstream compilers. Update docs. * Small improvement around ignoring tests. --- source/slang/slang-compiler.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index 889ecc58a..b02421c46 100644 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -1014,7 +1014,16 @@ namespace Slang auto& args = linkage->m_downstreamArgs.getArgsAt(nameIndex); for (const auto& arg : args.m_args) { - compilerSpecificArguments.add(arg.value); + // We special case some kinds of args, that can be handled directly + if (arg.value.startsWith("-I")) + { + // We handle the -I option, by just adding to the include paths + includePaths.add(arg.value.getUnownedSlice().tail(2)); + } + else + { + compilerSpecificArguments.add(arg.value); + } } } } -- cgit v1.2.3