Use MY_OS to avoid conflict with existing OS variable

# Conflicts:
#	.ci/appveyor-prepare.bat
This commit is contained in:
Michael Davidsaver
2019-10-01 16:56:17 -07:00
4 changed files with 75 additions and 29 deletions

View File

@@ -46,6 +46,8 @@ environment:
- TOOLCHAIN: 14.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLCHAIN: 2017
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLCHAIN: 2019
- TOOLCHAIN: mingw
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
@@ -76,6 +78,20 @@ build_script:
test_script:
- cmd: .ci/appveyor-make.bat runtests
#---------------------------------#
# debugging #
#---------------------------------#
## if you want to connect by remote desktop to a failed build, uncomment these lines
## note that you will need to connect within the usual build timeout limit (60 minutes)
## so you may want to adjust the build matrix above to just build the one of interest
#on_failure:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#---------------------------------#
# notifications #
#---------------------------------#

View File

@@ -1,6 +1,6 @@
:: Universal build script for AppVeyor (https://ci.appveyor.com/)
:: Environment:
:: TOOLCHAIN - toolchain version [10.0/11.0/12.0/14.0/2017/mingw]
:: TOOLCHAIN - toolchain version [10.0/11.0/12.0/14.0/2017/2019/mingw]
:: CONFIGURATION - determines EPICS build [dynamic/static]
:: PLATFORM - architecture [x86/x64]
::
@@ -8,13 +8,21 @@
Setlocal EnableDelayedExpansion
:: we do not currently have a combined static and debug EPICS_HOST_ARCH target
:: So a combined debug and static target will appear to be just static
:: but debug will have been specified in CONFIG_SITE by appveyor-prepare.bat
set "ST="
if /i "%CONFIGURATION%"=="static" set ST=-static
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
set "ST=-debug"
)
echo.%CONFIGURATION% | findstr /C:"static">nul && (
set "ST=-static"
)
set OS=64BIT
if "%PLATFORM%"=="x86" set OS=32BIT
set MY_OS=64BIT
if "%PLATFORM%"=="x86" set MY_OS=32BIT
echo [INFO] Platform: %OS%
echo [INFO] Platform: %MY_OS%
:: Use parallel make, except for 3.14
set "MAKEARGS=-j2 -Otarget"
@@ -22,7 +30,7 @@ if "%APPVEYOR_REPO_BRANCH%"=="3.14" set MAKEARGS=
if "%TOOLCHAIN%"=="mingw" (
set "MAKE=mingw32-make"
if "%OS%"=="64BIT" (
if "%MY_OS%"=="64BIT" (
set "EPICS_HOST_ARCH=windows-x64-mingw"
set "INCLUDE=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\include;%INCLUDE%"
set "PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%"
@@ -38,6 +46,11 @@ if "%TOOLCHAIN%"=="mingw" (
goto Finish
)
if "%TOOLCHAIN%"=="2019" (
echo [INFO] Setting strawberry perl path
set "PATH=c:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%"
)
set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN%"
if not exist "%VSINSTALL%\" set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio\%TOOLCHAIN%\Community"
if not exist "%VSINSTALL%\" goto MSMissing
@@ -46,9 +59,9 @@ set "MAKE=C:\tools\make"
echo [INFO] APPVEYOR_BUILD_WORKER_IMAGE=%APPVEYOR_BUILD_WORKER_IMAGE%
if "%OS%"=="64BIT" (
if "%MY_OS%"=="64BIT" (
set EPICS_HOST_ARCH=windows-x64%ST%
:: VS 2017
:: VS 2017/2019
if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat" (
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat"
where cl
@@ -73,7 +86,7 @@ if "%OS%"=="64BIT" (
)
) else (
set EPICS_HOST_ARCH=win32-x86%ST%
:: VS 2017
:: VS 2017/2019
if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat" (
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat"
where cl
@@ -101,7 +114,7 @@ if "%OS%"=="64BIT" (
)
:MSMissing
echo [INFO] Installation for MSVC Toolchain %TOOLCHAIN% / %OS% seems to be missing
echo [INFO] Installation for MSVC Toolchain %TOOLCHAIN% / %MY_OS% seems to be missing
exit 1
:MSFound

View File

@@ -11,28 +11,42 @@
Setlocal EnableDelayedExpansion
set OS=64BIT
if "%PLATFORM%"=="x86" set OS=32BIT
set MY_OS=64BIT
if "%PLATFORM%"=="x86" set MY_OS=32BIT
echo [INFO] Platform: %OS%
echo [INFO] Platform: %MY_OS%
if "%TOOLCHAIN%"=="mingw" (
echo.%CONFIGURATION% | findstr /C:"static">nul && (
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
echo [INFO] EPICS set up for static build
) || (
echo [INFO] EPICS set up for dynamic build
)
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
echo HOST_OPT=NO>> configure\CONFIG_SITE
echo [INFO] EPICS set up for debug build
) || (
echo [INFO] EPICS set up for optimized build
)
:: with MSVC either static or debug can be handled as part
:: of EPICS_HOST_ARCH but not both. So we set the appropriate
:: options in CONFIG_SITE. For mingw and cygwin they are missing
:: some static and debug targets so set things here too
echo.%CONFIGURATION% | findstr /C:"static">nul && (
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
echo [INFO] EPICS set up for static build
) || (
echo [INFO] EPICS set up for dynamic build
)
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
echo HOST_OPT=NO>> configure\CONFIG_SITE
echo [INFO] EPICS set up for debug build
) || (
echo [INFO] EPICS set up for optimized build
)
echo [INFO] Installing Make 4.2.1 from ANL web site
curl -fsS --retry 3 -o C:\tools\make-4.2.1.zip https://epics.anl.gov/download/tools/make-4.2.1-win64.zip
cd \tools
"C:\Program Files\7-Zip\7z" e make-4.2.1.zip
set "PERLVER=5.30.0.1"
if "%TOOLCHAIN%"=="2019" (
echo [INFO] Installing Strawberry Perl %PERLVER%
curl -fsS --retry 3 -o C:\tools\perl-%PERLVER%.zip http://strawberryperl.com/download/%PERLVER%/strawberry-perl-%PERLVER%-64bit.zip
cd \tools
"C:\Program Files\7-Zip\7z" x perl-%PERLVER%.zip -oC:\strawberry
cd \strawberry
:: we set PATH in appveyor-build.bat
call relocation.pl.bat
)

View File

@@ -141,13 +141,16 @@ STATIC_LDFLAGS=
RANLIB=
#
# option needed for parallel builds with Visual Studio 2015 onward
#
# option needed for parallel builds with Visual Studio 2013 onward
# VS2012 and above have VisualStudioVersion, so just need to exclude 2012 (11.0)
# -FS Force Synchronous PDB Writes
#
ifneq ($(VisualStudioVersion),)
ifneq ($(VisualStudioVersion),11.0)
OPT_CXXFLAGS_NO += -FS
OPT_CFLAGS_NO += -FS
endif
endif
#