]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/thrift/build/appveyor/cl_setenv.bat
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / thrift / build / appveyor / cl_setenv.bat
CommitLineData
f67539c2
TL
1::
2:: Licensed under the Apache License, Version 2.0 (the "License");
3:: you may not use this file except in compliance with the License.
4:: You may obtain a copy of the License at
5::
6:: http://www.apache.org/licenses/LICENSE-2.0
7::
8:: Unless required by applicable law or agreed to in writing, software
9:: distributed under the License is distributed on an "AS IS" BASIS,
10:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11:: See the License for the specific language governing permissions and
12:: limitations under the License.
13::
14
15@ECHO OFF
16
17IF "%PROFILE%" == "MSVC2012" (
18 CALL "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" %PLATFORM%
19) ELSE IF "%PROFILE%" == "MSVC2013" (
20 CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
21) ELSE IF "%PROFILE%" == "MSVC2015" (
22 CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
23) ELSE IF "%PROFILE%" == "MSVC2017" (
24 CALL :SETUPNEWERMSVC || EXIT /B
25) ELSE IF "%PROFILE%" == "MINGW" (
26 REM Supported, nothing special to do here.
27) ELSE IF "%PROFILE%" == "CYGWIN" (
28 REM Supported, nothing special to do here.
29) ELSE (
30 ECHO Unsupported PROFILE=%PROFILE% or PLATFORM=%PLATFORM%
31 EXIT /B 1
32)
33
34CALL cl_setcompiler.bat || EXIT /B
35CALL cl_setgenerator.bat || EXIT /B
36
37SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
38SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
39SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
40SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
41
42:: PLATFORM is x64 or x86
43:: NORM_PLATFORM is 64 or 32
44SET NORM_PLATFORM=%PLATFORM:~-2,2%
45IF "%NORM_PLATFORM%" == "86" (SET NORM_PLATFORM=32)
46
47IF "%PROFILE:~0,4%" == "MSVC" (
48
49 :: FindBoost needs forward slashes so cmake doesn't see something as an escaped character
50 SET BOOST_ROOT=C:/Libraries/boost_%BOOST_VERSION:.=_%
51 SET BOOST_LIBRARYDIR=!BOOST_ROOT!/lib%NORM_PLATFORM%-msvc-%COMPILER:~-3,2%.%COMPILER:~-1,1%
52 SET OPENSSL_ROOT=C:\OpenSSL-Win%NORM_PLATFORM%
53 SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
54
55 IF "%PYTHON_VERSION%" == "" (
56 SET WITH_PYTHON=OFF
57 ) ELSE (
58 SET WITH_PYTHON=ON
59 IF /i "%PLATFORM%" == "x64" SET PTEXT=-x64
60 SET PATH=C:\Python%PYTHON_VERSION:.=%!PTEXT!\scripts;C:\Python%PYTHON_VERSION:.=%!PTEXT!;!PATH!
61 )
62 IF "%CONFIGURATION%" == "Debug" (SET ZLIB_LIB_SUFFIX=d)
63
64 IF NOT "%QT_VERSION%" == "" (
65 IF /i "%PLATFORM%" == "x64" SET QTEXT=_64
66 SET PATH=C:\Qt\%QT_VERSION%\%PROFILE%!QTEXT!\bin;!PATH!
67 )
68
69) ELSE IF "%PROFILE:~0,4%" == "MING" (
70
71 :: PLATFORM = x86 means MINGWPLAT i686
72 :: PLATFORM = x64 means MINGWPLAT x86_64
73 SET MINGWPLAT=x86_64
74 IF "%PLATFORM%" == "x86" (SET MINGWPLAT=i686)
75
76 SET BASH=C:\msys64\usr\bin\bash.exe
77 !BASH! -lc "sed -i '/export PATH=\/mingw32\/bin/d' ~/.bash_profile && sed -i '/export PATH=\/mingw64\/bin/d' ~/.bash_profile && echo 'export PATH=/mingw%NORM_PLATFORM%/bin:$PATH' >> ~/.bash_profile" || EXIT /B
78
79 SET BUILDDIR=%BUILDDIR:\=/%
80 SET BUILDDIR=/c!BUILDDIR:~2!
81 SET INSTDIR=%INSTDIR:\=/%
82 SET INSTDIR=/c!INSTDIR:~2!
83 SET SRCDIR=%SRCDIR:\=/%
84 SET SRCDIR=/c!SRCDIR:~2!
85
86) ELSE IF "%PROFILE:~0,4%" == "CYGW" (
87
88 SET CYGWINROOT=C:\cygwin
89 IF "%PLATFORM%" == "x64" (SET CYGWINROOT=!CYGWINROOT!64)
90
91 SET BASH=!CYGWINROOT!\bin\bash.exe
92 SET SETUP=!CYGWINROOT!\setup-x86
93 IF "%PLATFORM%" == "x64" (SET SETUP=!SETUP!_64)
94 SET SETUP=!SETUP!.exe
95
96 SET BUILDDIR=%BUILDDIR:\=/%
97 SET BUILDDIR=/cygdrive/c!BUILDDIR:~2!
98 SET INSTDIR=%INSTDIR:\=/%
99 SET INSTDIR_CYG=/cygdrive/c!INSTDIR:~2!
100 SET SRCDIR=%SRCDIR:\=/%
101 SET SRCDIR=/cygdrive/c!SRCDIR:~2!
102
103)
104
105GOTO :EOF
106
107:SETUPNEWERMSVC
108 :: If VsDevCmd.bat has already executed, as is the case in the
109 :: msvc2017 docker container, skip this...
110 IF NOT DEFINED VSCMD_VER (
111 FOR /F "USEBACKQ TOKENS=*" %%i IN (`call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version "[15.0,16.0)" -property installationPath`) DO (
112 IF "%MSVCROOT%" == "" (SET MSVCROOT=%%i)
113 )
114 SET MSVCPLAT=x86
115 IF "%PLATFORM%" == "x64" (SET MSVCPLAT=amd64)
116
117 SET CURRENTDIR=%CD%
118 CALL "!MSVCROOT!\Common7\Tools\VsDevCmd.bat" -arch=!MSVCPLAT! || EXIT /B
119 CD %CURRENTDIR%
120 EXIT /B
121 )
122:EOF