2023-12-14 03:38:41 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-05-31 03:56:16 +08:00
|
|
|
# Copyright 2014-2016 The Meson development team
|
|
|
|
|
2022-06-10 12:29:27 +08:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
import typing as T
|
2016-05-31 03:56:16 +08:00
|
|
|
|
|
|
|
from .vs2010backend import Vs2010Backend
|
2019-08-24 07:32:56 +08:00
|
|
|
from ..mesonlib import MesonException
|
2016-05-31 03:56:16 +08:00
|
|
|
|
2022-06-10 12:29:27 +08:00
|
|
|
if T.TYPE_CHECKING:
|
|
|
|
from ..build import Build
|
|
|
|
from ..interpreter import Interpreter
|
2016-05-31 03:56:16 +08:00
|
|
|
|
|
|
|
class Vs2015Backend(Vs2010Backend):
|
2022-09-01 12:59:11 +08:00
|
|
|
|
|
|
|
name = 'vs2015'
|
|
|
|
|
2020-01-06 19:11:19 +08:00
|
|
|
def __init__(self, build: T.Optional[Build], interpreter: T.Optional[Interpreter]):
|
|
|
|
super().__init__(build, interpreter)
|
2016-07-19 04:59:09 +08:00
|
|
|
self.vs_version = '2015'
|
2021-11-24 17:54:37 +08:00
|
|
|
self.sln_file_version = '12.00'
|
|
|
|
self.sln_version_comment = '14'
|
2019-08-24 07:32:56 +08:00
|
|
|
if self.environment is not None:
|
|
|
|
# TODO: we assume host == build
|
|
|
|
comps = self.environment.coredata.compilers.host
|
|
|
|
if comps and all(c.id == 'intel-cl' for c in comps.values()):
|
|
|
|
c = list(comps.values())[0]
|
|
|
|
if c.version.startswith('19'):
|
|
|
|
self.platform_toolset = 'Intel C++ Compiler 19.0'
|
|
|
|
else:
|
|
|
|
# We don't have support for versions older than 2019 right now.
|
|
|
|
raise MesonException('There is currently no support for ICL before 19, patches welcome.')
|
|
|
|
if self.platform_toolset is None:
|
|
|
|
self.platform_toolset = 'v140'
|