Skip to content

Commit

Permalink
Fixed undefined cmake variable at root variable tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Oct 17, 2021
1 parent 343fa03 commit a665cf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/IL2C.Core.Test.Fixture/CMakeDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public static async Task<string> BuildAsync(

// Step1: Execute gcc
var (gccExitCode, gccLog) = await TestUtilities.ExecuteAsync(
outPath, new[] { binPath },
Path.Combine(binPath, isWindows ? "gcc.exe" : "gcc"),
outPath, isWindows ? new[] { binPath } : Array.Empty<string>(),
isWindows ? Path.Combine(binPath, "gcc.exe") : "gcc", // NOT windows: uses system default gcc.
$"-I{basePath}",
incDir,
libDir,
Expand Down
2 changes: 1 addition & 1 deletion tests/IL2C.Core.Test.Fixture/CMakeListsSimpleParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private static IEnumerable<Func<string>> SplitArguments(string args, Dictionary<
}
else
{
exprs.Add(() => definitions[fxd]());
exprs.Add(() => definitions.TryGetValue(fxd, out var value) ? value() : string.Empty);
}
state = 0;
index++;
Expand Down

0 comments on commit a665cf8

Please sign in to comment.