craype fixes for scr (#23510)

turn off static linking, add -ldl flag

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
This commit is contained in:
lukebroskop 2021-05-17 11:14:08 -05:00 committed by GitHub
parent 8446bebdd9
commit 87466df80f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,6 +123,14 @@ class Scr(CMakePackage):
variant('cntl_base', default=platform_tmp_default,
description='Compile time default location for control directory.')
def flag_handler(self, name, flags):
if self.spec.satisfies('%cce'):
if name in ['cflags', 'cxxflags', 'cppflags']:
return (None, flags, None)
elif name == 'ldflags':
flags.append('-ldl')
return (flags, None, None)
def get_abs_path_rel_prefix(self, path):
# Return path if absolute, otherwise prepend prefix
if os.path.isabs(path):
@ -135,7 +143,7 @@ def cmake_args(self):
args = []
if 'platform=cray' in spec:
args.append('-DSCR_LINK_STATIC=ON')
args.append('-DSCR_LINK_STATIC=OFF')
args.append('-DENABLE_FORTRAN={0}'.format('+fortran' in spec))