Skip to content

Commit 12640c8

Browse files
committed
win: clone mpir-vs2026 from IfcOpenShell's own fork
Andrej730/mpir-vs2026's unconstrained "vswhere -latest" detection picks a newer Visual Studio when multiple are installed, breaking the VS2017 MSBuild path (IfcOpenShell#8631). A logic fix for this has been proposed directly in IfcOpenShell's own fork of that dependency (IfcOpenShell/mpir-vs2026#1), so point the clone at that fork instead of upstream. Kept the local msbdir pre-detection workaround alongside this redirect: the fork-side fix is unverified on real Windows and not yet merged, and the workaround costs nothing once it lands, since msbuild.bat already skips its own detection when msbdir is pre-set. Generated with the assistance of an AI coding tool.
1 parent 75d594a commit 12640c8

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

win/build-deps.cmd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ IF NOT EXIST "%INSTALL_DIR%". mkdir "%INSTALL_DIR%"
9090
:: If we use VS2008, framework path (for MSBuild) may not be correctly set. Manually attempt to add in that case
9191
IF %VS_VER%==2008 set PATH=C:\Windows\Microsoft.NET\Framework\v3.5;%PATH%
9292

93-
:: Work around Andrej730/mpir-vs2026's unconstrained "vswhere -latest" detection picking a newer VS
94-
:: when multiple are installed, see #8631. Pre-set msbdir here so msvc\vs17\msbuild.bat's own
95-
:: (broken) detection is skipped, since it already honors a pre-set msbdir.
93+
:: Belt-and-braces workaround for IfcOpenShell/mpir-vs2026's unconstrained "vswhere -latest"
94+
:: detection picking a newer VS when multiple are installed, see #8631. A logic fix for this
95+
:: has been proposed upstream in that fork directly, but keep this local pre-detection too so
96+
:: the build isn't dependent on that fix being merged (or correct). Pre-set msbdir here so
97+
:: msvc\vs17\msbuild.bat's own detection is skipped, since it already honors a pre-set msbdir.
9698
IF NOT %VS_VER%==2017 GOTO :Msbdir2017Done
9799
IF DEFINED msbdir GOTO :Msbdir2017Done
98100

@@ -335,7 +337,7 @@ IF EXIST "%INSTALL_DIR%\mpir" (
335337
set DEPENDENCY_NAME=mpir
336338
:: `mpfr` depends on relative path `..\mpir\config.h`, so dependency name should match exactly.
337339
set DEPENDENCY_DIR=%DEPS_DIR%\mpir
338-
call :GitCloneAndCheckoutRevision https://github.com/Andrej730/mpir-vs2026.git "%DEPENDENCY_DIR%"
340+
call :GitCloneAndCheckoutRevision https://github.com/IfcOpenShell/mpir-vs2026.git "%DEPENDENCY_DIR%"
339341
IF NOT %ERRORLEVEL%==0 GOTO :Error
340342
pushd "%DEPENDENCY_DIR%"
341343
git reset --hard

0 commit comments

Comments
 (0)