appveyor: CC -> CMP for compiler toolchain setting
This commit is contained in:
@@ -55,36 +55,35 @@ configuration:
|
||||
- dynamic-debug
|
||||
- static-debug
|
||||
|
||||
# Environment variables: compiler toolchain
|
||||
# Environment variables: compiler toolchain, base version, setup file, ...
|
||||
environment:
|
||||
# common variables
|
||||
# common / default variables for all jobs
|
||||
SETUP_PATH: .:.ci
|
||||
SET: test01
|
||||
BASE_RECURSIVE: NO
|
||||
VV: 1
|
||||
|
||||
matrix:
|
||||
- CC: vs2019
|
||||
- CMP: vs2019
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
SET: test00
|
||||
- CC: mingw
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- CC: vs2019
|
||||
- CMP: mingw
|
||||
- CMP: vs2019
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
VV: 0
|
||||
- CC: vs2019
|
||||
- CMP: vs2019
|
||||
BASE: 3.15
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
- CC: vs2019
|
||||
- CMP: vs2019
|
||||
BASE: 3.14
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
- CC: vs2017
|
||||
- CMP: vs2017
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- CC: vs2015
|
||||
- CC: vs2013
|
||||
- CC: vs2012
|
||||
- CC: vs2010
|
||||
- CC: vs2008
|
||||
- CMP: vs2015
|
||||
- CMP: vs2013
|
||||
- CMP: vs2012
|
||||
- CMP: vs2010
|
||||
- CMP: vs2008
|
||||
|
||||
# Platform: architecture
|
||||
platform:
|
||||
@@ -105,11 +104,11 @@ matrix:
|
||||
SET: test00
|
||||
# VS2012 and older installs don't have the 64 bit compiler
|
||||
- platform: x64
|
||||
CC: vs2012
|
||||
CMP: vs2012
|
||||
- platform: x64
|
||||
CC: vs2010
|
||||
CMP: vs2010
|
||||
- platform: x64
|
||||
CC: vs2008
|
||||
CMP: vs2008
|
||||
|
||||
# Run test script for unit tests (SET = test00)
|
||||
for:
|
||||
|
||||
@@ -290,7 +290,7 @@ class TestDefaultModuleURLs(unittest.TestCase):
|
||||
|
||||
class TestVCVars(unittest.TestCase):
|
||||
def test_vcvars(self):
|
||||
if ('CC' in os.environ and os.environ['CC'] in ('mingw',)) \
|
||||
if ('CMP' in os.environ and os.environ['CMP'] in ('mingw',)) \
|
||||
or distutils.util.get_platform() != "win32":
|
||||
raise unittest.SkipTest()
|
||||
|
||||
@@ -299,7 +299,7 @@ class TestVCVars(unittest.TestCase):
|
||||
class TestSetupForBuild(unittest.TestCase):
|
||||
configuration = os.environ['CONFIGURATION']
|
||||
platform = os.environ['PLATFORM']
|
||||
cc = os.environ['CC']
|
||||
cc = os.environ['CMP']
|
||||
args = Namespace(paths=[])
|
||||
|
||||
def setUp(self):
|
||||
@@ -308,7 +308,7 @@ class TestSetupForBuild(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
os.environ['CONFIGURATION'] = self.configuration
|
||||
os.environ['PLATFORM'] = self.platform
|
||||
os.environ['CC'] = self.cc
|
||||
os.environ['CMP'] = self.cc
|
||||
|
||||
def test_AddPathsOption(self):
|
||||
os.environ['FOOBAR'] = 'BAR'
|
||||
@@ -344,7 +344,7 @@ class TestSetupForBuild(unittest.TestCase):
|
||||
for platform in ['x86', 'x64', 'X64']:
|
||||
for cc in ['vs2019', 'mingw']:
|
||||
os.environ['PLATFORM'] = platform
|
||||
os.environ['CC'] = cc
|
||||
os.environ['CMP'] = cc
|
||||
os.environ['CONFIGURATION'] = 'dynamic'
|
||||
do.setup_for_build(self.args)
|
||||
self.assertTrue('EPICS_HOST_ARCH' in os.environ,
|
||||
@@ -368,7 +368,7 @@ class TestSetupForBuild(unittest.TestCase):
|
||||
'Include location for {0} not in INCLUDE'.format(pattern))
|
||||
|
||||
def test_StrawberryInPath(self):
|
||||
os.environ['CC'] = 'vs2019'
|
||||
os.environ['CMP'] = 'vs2019'
|
||||
do.setup_for_build(self.args)
|
||||
self.assertTrue(re.search('strawberry', os.environ['PATH']),
|
||||
'Strawberry Perl location not in PATH for vs2019')
|
||||
|
||||
@@ -338,12 +338,12 @@ def setup_for_build(args):
|
||||
elif os.environ['PLATFORM'].lower() == 'x64':
|
||||
os.environ['EPICS_HOST_ARCH'] = 'windows-x64' + hostarchsuffix
|
||||
|
||||
if os.environ['CC'] == 'vs2019':
|
||||
if os.environ['CMP'] == 'vs2019':
|
||||
# put our strawberry 'perl' in the PATH
|
||||
os.environ['PATH'] = os.pathsep.join([os.path.join(toolsdir, 'strawberry', 'perl', 'site', 'bin'),
|
||||
os.path.join(toolsdir, 'strawberry', 'perl', 'bin'),
|
||||
os.environ['PATH']])
|
||||
if os.environ['CC'] == 'mingw':
|
||||
if os.environ['CMP'] == 'mingw':
|
||||
if 'INCLUDE' not in os.environ:
|
||||
os.environ['INCLUDE'] = ''
|
||||
if os.environ['PLATFORM'].lower() == 'x86':
|
||||
@@ -453,7 +453,7 @@ def prepare(args):
|
||||
os.remove(os.path.join(toolsdir, 'make-{0}.zip'.format(makever)))
|
||||
|
||||
perlver = '5.30.0.1'
|
||||
if os.environ['CC'] == 'vs2019':
|
||||
if os.environ['CMP'] == 'vs2019':
|
||||
if not os.path.isdir(os.path.join(toolsdir, 'strawberry')):
|
||||
print('Installing Strawberry Perl {0}'.format(perlver))
|
||||
sys.stdout.flush()
|
||||
@@ -476,7 +476,7 @@ def prepare(args):
|
||||
sys.stdout.flush()
|
||||
sp.check_call(['perl', '--version'])
|
||||
|
||||
if os.environ['CC'] == 'mingw':
|
||||
if os.environ['CMP'] == 'mingw':
|
||||
print('{0}$ gcc --version{1}'.format(ANSI_CYAN, ANSI_RESET))
|
||||
sys.stdout.flush()
|
||||
sp.check_call(['gcc', '--version'])
|
||||
@@ -523,7 +523,7 @@ def doExec(args):
|
||||
def with_vcvars(cmd):
|
||||
'''re-exec main script with a (hopefully different) command
|
||||
'''
|
||||
CC = os.environ['CC']
|
||||
CC = os.environ['CMP']
|
||||
|
||||
# cf. https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
|
||||
|
||||
@@ -602,7 +602,7 @@ def main(raw):
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
silent_dep_builds = False
|
||||
|
||||
if args.vcvars and os.environ['CC'].startswith('vs'):
|
||||
if args.vcvars and os.environ['CMP'].startswith('vs'):
|
||||
# re-exec with MSVC in PATH
|
||||
with_vcvars(' '.join(['--no-vcvars']+raw))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user