Add VS2019 backend CI and docs.

pull/4747/merge
Anton Kochkov 6 years ago committed by Jussi Pakkanen
parent b510bc12ac
commit ad0ba6a911
  1. 23
      azure-pipelines.yml
  2. 7
      ci/azure-steps.yml
  3. 2
      docs/markdown/Configuring-a-build-directory.md
  4. 3
      docs/markdown/Reference-manual.md
  5. 2
      mesonbuild/backend/vs2010backend.py
  6. 34
      mesonbuild/backend/vs2019backend.py

@ -57,6 +57,29 @@ jobs:
architecture: 'x64'
- template: ci/azure-steps.yml
- job: vs2019
pool:
vmImage: windows-2019
strategy:
matrix:
vc2019x64ninja:
arch: x64
compiler: msvc2019
backend: ninja
vc2019x64vs:
arch: x64
compiler: msvc2019
backend: vs2019
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- template: ci/azure-steps.yml
- job: cygwin
pool:
vmImage: VS2017-Win2016

@ -99,6 +99,8 @@ steps:
# import visual studio variables
if ($env:compiler -eq 'msvc2015') {
$vcvars = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
} elseif($env:compiler -eq 'msvc2019') {
$vcvars = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
} else {
$vcvars = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
}
@ -154,7 +156,10 @@ steps:
echo ""
echo "=== Start running tests ==="
python run_tests.py --backend $(backend)
# Starting from VS2019 Powershell(?) will fail the test run
# if it prints anything to stderr. Python's test runner
# does that by default so we need to forward it.
cmd /c 'python 2>&1' run_tests.py --backend $(backend)
- task: PublishTestResults@2
inputs:

@ -24,7 +24,7 @@ sample output for a simple project.
Option Current Value Possible Values Description
------ ------------- --------------- -----------
auto_features auto [enabled, disabled, auto] Override value of all 'auto' features
backend ninja [ninja, vs, vs2010, vs2015, vs2017, xcode] Backend to use
backend ninja [ninja, vs, vs2010, vs2015, vs2017, vs2019, xcode] Backend to use
buildtype release [plain, debug, debugoptimized, release, minsize, custom] Build type to use
debug false [true, false] Debug
default_library shared [shared, static, both] Default library type

@ -1553,7 +1553,8 @@ the following methods.
`MESON_SOURCE_ROOT` and `MESON_BUILD_ROOT` set.
- `backend()` *(added 0.37.0)* returns a string representing the
current backend: `ninja`, `vs2010`, `vs2015`, `vs2017`, or `xcode`.
current backend: `ninja`, `vs2010`, `vs2015`, `vs2017`, `vs2019`,
or `xcode`.
- `build_root()` returns a string with the absolute path to the build
root directory. Note: this function will return the build root of

@ -207,7 +207,7 @@ class Vs2010Backend(backends.Backend):
if 'VCINSTALLDIR' in os.environ:
vs_version = os.environ['VisualStudioVersion'] \
if 'VisualStudioVersion' in os.environ else None
relative_path = 'Auxiliary\\Build\\' if vs_version == '15.0' else ''
relative_path = 'Auxiliary\\Build\\' if vs_version >= '15.0' else ''
script_path = os.environ['VCINSTALLDIR'] + relative_path + 'vcvarsall.bat'
if os.path.exists(script_path):
if has_arch_values:

@ -0,0 +1,34 @@
# Copyright 2014-2019 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import xml.etree.ElementTree as ET
from .vs2010backend import Vs2010Backend
class Vs2019Backend(Vs2010Backend):
def __init__(self, build):
super().__init__(build)
self.name = 'vs2019'
self.platform_toolset = 'v142'
self.vs_version = '2019'
# WindowsSDKVersion should be set by command prompt.
sdk_version = os.environ.get('WindowsSDKVersion', None)
if sdk_version:
self.windows_target_platform_version = sdk_version.rstrip('\\')
def generate_debug_information(self, link):
# valid values for vs2019 is 'false', 'true', 'DebugFastLink', 'DebugFull'
ET.SubElement(link, 'GenerateDebugInformation').text = 'DebugFull'
Loading…
Cancel
Save