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
if archs != 'none':
arch_str = ",".join(archs)
cxxflags_str = " ".join(self.spec.compiler_flags['cxxflags'])
args.append(
'-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)

View file

@ -358,9 +358,11 @@ def cmake_args(self):
archs = self.spec.variants['amdgpu_target'].value
if archs != 'none':
arch_str = ",".join(archs)
cxxflags_str = " ".join(self.spec.compiler_flags['cxxflags'])
args.append(
'-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