Skip to content

Commit

Permalink
(#308) IntegrationTests: try migrating to x86 cl.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Jul 21, 2023
1 parent 64d893f commit a68b755
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Cesium.IntegrationTests/IntegrationTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ private async Task<string> BuildExecutableWithNativeCompiler(
var vcInstallationFolder = _context.VisualStudioPath;
Assert.NotNull(vcInstallationFolder);

var clExePath = Path.Combine(vcInstallationFolder, @"bin\HostX64\x64\cl.exe");
var pathToLibs = Path.Combine(vcInstallationFolder, @"lib\x64");
var pathToIncludes = Path.Combine(vcInstallationFolder, @"include");
var clExePath = Path.Combine(vcInstallationFolder, @"bin\Hostx86\x86\cl.exe");
var pathToLibs = Path.Combine(vcInstallationFolder, @"lib\x86");
var pathToIncludes = Path.Combine(vcInstallationFolder, "include");
var win10SdkPath = WindowsEnvUtil.FindWin10Sdk();
string win10Libs = WindowsEnvUtil.FindLibsFolder(win10SdkPath);
string win10Include = WindowsEnvUtil.FindIncludeFolder(win10SdkPath);
Expand All @@ -113,8 +113,8 @@ await ExecUtil.RunToSuccess(
$@"/I{win10Include}\ucrt",
"/link",
$"/LIBPATH:{pathToLibs}",
$@"/LIBPATH:{win10Libs}\um\x64",
$@"/LIBPATH:{win10Libs}\ucrt\x64"
$@"/LIBPATH:{win10Libs}\um\x86",
$@"/LIBPATH:{win10Libs}\ucrt\x86"
});
}
else
Expand Down
4 changes: 2 additions & 2 deletions Cesium.IntegrationTests/WindowsEnvUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static async Task<string> FindVCCompilerInstallationFolder(ITestOutputHel
string? pathToCL = null;
foreach (var folder in Directory.EnumerateDirectories(vcRootLocation, "14.*", SearchOption.TopDirectoryOnly))
{
var clPath = Path.Combine(folder, @"bin\HostX64\x64\cl.exe");
var clPath = Path.Combine(folder, @"bin\Hostx86\x86\cl.exe");
if (File.Exists(clPath))
pathToCL = folder;
}
Expand Down Expand Up @@ -88,7 +88,7 @@ public static string FindLibsFolder(string win10SdkPath)
string? win10Libs = null;
foreach (var versionFolder in Directory.EnumerateDirectories(Path.Combine(win10SdkPath, "Lib")))
{
var win10LibPathCandidate = Path.Combine(versionFolder, @"um\x64");
var win10LibPathCandidate = Path.Combine(versionFolder, @"um\x86");
if (Directory.Exists(win10LibPathCandidate))
win10Libs = versionFolder;
}
Expand Down

0 comments on commit a68b755

Please sign in to comment.