Fossil SCM
Support out-of-source build on Windows when BUILDDIR envvar is not set.
Commit
0f0b904337150bd54852966dac0ccfe509aa368b91bc1dc3e49ae4ec428b2d9b
Parent
d80633a369b91d9…
1 file changed
+10
-2
+10
-2
| --- win/buildmsvc.bat | ||
| +++ win/buildmsvc.bat | ||
| @@ -195,17 +195,25 @@ | ||
| 195 | 195 | REM |
| 196 | 196 | ) ELSE ( |
| 197 | 197 | REM |
| 198 | 198 | REM NOTE: The build suffix is not present, add it now. |
| 199 | 199 | REM |
| 200 | - SET BUILDDIR=%BUILDDIR%%BUILDSUFFIX% | |
| 200 | + SET "BUILDDIR=%BUILDDIR%%BUILDSUFFIX%" | |
| 201 | 201 | ) |
| 202 | 202 | |
| 203 | 203 | CALL :fn_ResetErrorLevel |
| 204 | 204 | ) |
| 205 | 205 | ) ELSE ( |
| 206 | - SET BUILDDIR=%ROOT%\msvcbld%BUILDSUFFIX% | |
| 206 | + REM | |
| 207 | + REM When BUILDDIR is not defined, build in the current directory. | |
| 208 | + REM For compatibility, create the build artifacts in 'msvcbld' | |
| 209 | + REM subdirectory (similar to how the Linux build is done). | |
| 210 | + REM | |
| 211 | + REM USECASE-1: in-source build (current dir is %ROOT%) | |
| 212 | + REM USECASE-2: out-of-source build (current dir is arbitrary) | |
| 213 | + REM | |
| 214 | + SET "BUILDDIR=%CD%\msvcbld%BUILDSUFFIX%" | |
| 207 | 215 | ) |
| 208 | 216 | |
| 209 | 217 | %_VECHO% BuildSuffix = '%BUILDSUFFIX%' |
| 210 | 218 | %_VECHO% BuildDir = '%BUILDDIR%' |
| 211 | 219 | |
| 212 | 220 |
| --- win/buildmsvc.bat | |
| +++ win/buildmsvc.bat | |
| @@ -195,17 +195,25 @@ | |
| 195 | REM |
| 196 | ) ELSE ( |
| 197 | REM |
| 198 | REM NOTE: The build suffix is not present, add it now. |
| 199 | REM |
| 200 | SET BUILDDIR=%BUILDDIR%%BUILDSUFFIX% |
| 201 | ) |
| 202 | |
| 203 | CALL :fn_ResetErrorLevel |
| 204 | ) |
| 205 | ) ELSE ( |
| 206 | SET BUILDDIR=%ROOT%\msvcbld%BUILDSUFFIX% |
| 207 | ) |
| 208 | |
| 209 | %_VECHO% BuildSuffix = '%BUILDSUFFIX%' |
| 210 | %_VECHO% BuildDir = '%BUILDDIR%' |
| 211 | |
| 212 |
| --- win/buildmsvc.bat | |
| +++ win/buildmsvc.bat | |
| @@ -195,17 +195,25 @@ | |
| 195 | REM |
| 196 | ) ELSE ( |
| 197 | REM |
| 198 | REM NOTE: The build suffix is not present, add it now. |
| 199 | REM |
| 200 | SET "BUILDDIR=%BUILDDIR%%BUILDSUFFIX%" |
| 201 | ) |
| 202 | |
| 203 | CALL :fn_ResetErrorLevel |
| 204 | ) |
| 205 | ) ELSE ( |
| 206 | REM |
| 207 | REM When BUILDDIR is not defined, build in the current directory. |
| 208 | REM For compatibility, create the build artifacts in 'msvcbld' |
| 209 | REM subdirectory (similar to how the Linux build is done). |
| 210 | REM |
| 211 | REM USECASE-1: in-source build (current dir is %ROOT%) |
| 212 | REM USECASE-2: out-of-source build (current dir is arbitrary) |
| 213 | REM |
| 214 | SET "BUILDDIR=%CD%\msvcbld%BUILDSUFFIX%" |
| 215 | ) |
| 216 | |
| 217 | %_VECHO% BuildSuffix = '%BUILDSUFFIX%' |
| 218 | %_VECHO% BuildDir = '%BUILDDIR%' |
| 219 | |
| 220 |