cue: make cxx work when base is cached

This commit is contained in:
Ralph Lange
2021-02-15 19:28:49 +01:00
parent 99057a5ff6
commit 3db08b5977
4 changed files with 197 additions and 137 deletions

9
cue.py
View File

@@ -809,6 +809,12 @@ def prepare(args):
fold_end('check.out.dependencies', 'Checking/cloning dependencies')
cxx = None
if ci['compiler'].startswith('clang'):
cxx = re.sub(r'clang', r'clang++', ci['compiler'])
elif ci['compiler'].startswith('gcc'):
cxx = re.sub(r'gcc', r'g++', ci['compiler'])
if 'BASE' in modules_to_compile or building_base:
fold_start('set.up.epics_build', 'Configuring EPICS build system')
@@ -903,9 +909,7 @@ CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386{0}'''.format(qemu_suffix))
print('Host compiler', ci['compiler'])
cxx = None
if ci['compiler'].startswith('clang'):
cxx = re.sub(r'clang', r'clang++', ci['compiler'])
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
'CONFIG_SITE.Common.'+os.environ['EPICS_HOST_ARCH']), 'a') as f:
f.write('''
@@ -920,7 +924,6 @@ CCC = {1}'''.format(ci['compiler'], cxx))
CMPLR_CLASS = clang''')
elif ci['compiler'].startswith('gcc'):
cxx = re.sub(r'gcc', r'g++', ci['compiler'])
with open(os.path.join(places['EPICS_BASE'], 'configure', 'os',
'CONFIG_SITE.Common.' + os.environ['EPICS_HOST_ARCH']), 'a') as f:
f.write('''