hydrogen, lbann: forward the CXXFLAGS to the HIP_HIPCC_FLAGS variable. (#22744)

This commit is contained in:
Brian Van Essen 2021-04-06 00:38:37 -07:00 committed by GitHub
parent 802f4d9ffa
commit 023524365c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -169,9 +169,10 @@ def cmake_args(self):
archs = self.spec.variants['amdgpu_target'].value archs = self.spec.variants['amdgpu_target'].value
if archs != 'none': if archs != 'none':
arch_str = ",".join(archs) arch_str = ",".join(archs)
cxxflags_str = " ".join(self.spec.compiler_flags['cxxflags'])
args.append( args.append(
'-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}'
' -g -fsized-deallocation -fPIC'.format(arch_str) ' -g -fsized-deallocation -fPIC {1}'.format(arch_str, cxxflags_str)
) )
# Add support for OS X to find OpenMP (LLVM installed via brew) # Add support for OS X to find OpenMP (LLVM installed via brew)

View File

@ -358,9 +358,11 @@ def cmake_args(self):
archs = self.spec.variants['amdgpu_target'].value archs = self.spec.variants['amdgpu_target'].value
if archs != 'none': if archs != 'none':
arch_str = ",".join(archs) arch_str = ",".join(archs)
cxxflags_str = " ".join(self.spec.compiler_flags['cxxflags'])
args.append( args.append(
'-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}'
' -g -fsized-deallocation -fPIC -std=c++17'.format(arch_str) ' -g -fsized-deallocation -fPIC -std=c++17 {1}'.format(
arch_str, cxxflags_str)
) )
return args return args