summaryrefslogtreecommitdiffstats
path: root/src/boost/bootstrap.bat
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/boost/bootstrap.bat
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/bootstrap.bat')
-rw-r--r--src/boost/bootstrap.bat97
1 files changed, 97 insertions, 0 deletions
diff --git a/src/boost/bootstrap.bat b/src/boost/bootstrap.bat
new file mode 100644
index 00000000..74112452
--- /dev/null
+++ b/src/boost/bootstrap.bat
@@ -0,0 +1,97 @@
+@ECHO OFF
+
+SETLOCAL
+
+REM Copyright 2019 Rene Rivera
+REM Copyright (C) 2009 Vladimir Prus
+REM
+REM Distributed under the Boost Software License, Version 1.0.
+REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+ECHO Building Boost.Build engine
+if exist ".\tools\build\src\engine\b2.exe" del tools\build\src\engine\b2.exe
+pushd tools\build\src\engine
+
+call .\build.bat %* > ..\..\..\..\bootstrap.log
+@ECHO OFF
+
+popd
+
+if exist ".\tools\build\src\engine\b2.exe" (
+ copy .\tools\build\src\engine\b2.exe . > nul
+ goto :bjam_built)
+
+goto :bjam_failure
+
+:bjam_built
+
+REM Ideally, we should obtain the toolset that build.bat has
+REM guessed. However, it uses setlocal at the start and does not
+REM export BOOST_JAM_TOOLSET, and I don't know how to do that
+REM properly. Default to msvc if not specified.
+
+SET TOOLSET=msvc
+
+IF "%1"=="gcc" SET TOOLSET=gcc
+
+IF "%1"=="vc71" SET TOOLSET=msvc : 7.1
+IF "%1"=="vc8" SET TOOLSET=msvc : 8.0
+IF "%1"=="vc9" SET TOOLSET=msvc : 9.0
+IF "%1"=="vc10" SET TOOLSET=msvc : 10.0
+IF "%1"=="vc11" SET TOOLSET=msvc : 11.0
+IF "%1"=="vc12" SET TOOLSET=msvc : 12.0
+IF "%1"=="vc14" SET TOOLSET=msvc : 14.0
+IF "%1"=="vc141" SET TOOLSET=msvc : 14.1
+IF "%1"=="vc142" SET TOOLSET=msvc : 14.2
+
+ECHO.
+ECHO Generating Boost.Build configuration in project-config.jam for %TOOLSET%...
+ECHO # Boost.Build Configuration > project-config.jam
+ECHO # Automatically generated by bootstrap.bat >> project-config.jam
+ECHO. >> project-config.jam
+ECHO import option ; >> project-config.jam
+ECHO. >> project-config.jam
+ECHO using %TOOLSET% ; >> project-config.jam
+ECHO. >> project-config.jam
+ECHO option.set keep-going : false ; >> project-config.jam
+ECHO. >> project-config.jam
+
+ECHO.
+ECHO Bootstrapping is done. To build, run:
+ECHO.
+ECHO .\b2
+ECHO.
+
+IF EXIST libs\config\include (
+ECHO. To generate header files, run:
+ECHO.
+ECHO. .\b2 headers
+ECHO.
+)
+
+ECHO To adjust configuration, edit 'project-config.jam'.
+ECHO Further information:
+ECHO.
+ECHO - Command line help:
+ECHO .\b2 --help
+ECHO.
+ECHO - Getting started guide:
+ECHO http://boost.org/more/getting_started/windows.html
+ECHO.
+ECHO - Boost.Build documentation:
+ECHO http://www.boost.org/build/
+ECHO.
+
+goto :end
+
+:bjam_failure
+
+ECHO.
+ECHO Failed to build Boost.Build engine.
+ECHO Please consult bootstrap.log for further diagnostics.
+ECHO.
+
+REM Set an error code to allow `bootstrap && b2`
+cmd /c exit /b 1 > nul
+
+:end