From 2f14f80f4295f5b33f5b43ed6200915782032824 Mon Sep 17 00:00:00 2001 From: Peter Munch-Ellingsen Date: Sat, 7 Jan 2023 23:07:59 +0100 Subject: [PATCH] Tiny fixups --- src/futhark.nim | 4 +++- tests/{tstib.nim => tstb.nim} | 0 2 files changed, 3 insertions(+), 1 deletion(-) rename tests/{tstib.nim => tstb.nim} (100%) diff --git a/src/futhark.nim b/src/futhark.nim index d0a5b1e..e22e984 100644 --- a/src/futhark.nim +++ b/src/futhark.nim @@ -496,7 +496,9 @@ macro importc*(imports: varargs[untyped]): untyped = cargs.add superQuote do: "-I" & absolutePath(`path`, getProjectPath()) sysPathDefined = true if not sysPathDefined: - cargs.add superQuote do: "-I" & getClangIncludePath() + let clangIncludePath = getClangIncludePath() + if clangIncludePath != "": + cargs.add newLit("-I" & clangIncludePath) result.add quote do: importcImpl(`defs`, `cargs`, `files`, `importDirs`, `renames`, `retypes`, RenameCallback(`renameCallback`)) macro importcImpl*(defs: static[string], compilerArguments, files: static[openArray[string]], importDirs: static[openArray[string]], renames, retypes: static[openArray[FromTo]], renameCallback: static[RenameCallback]): untyped = diff --git a/tests/tstib.nim b/tests/tstb.nim similarity index 100% rename from tests/tstib.nim rename to tests/tstb.nim