fixed compiler config init logic
This commit is contained in:
parent
88bec814eb
commit
189e8b3f34
@ -102,15 +102,18 @@ def init_compiler_config():
|
|||||||
# configured. Avoid updating automatically if there ARE site
|
# configured. Avoid updating automatically if there ARE site
|
||||||
# compilers configured but no user ones.
|
# compilers configured but no user ones.
|
||||||
# if (isinstance(arch, basestring) or arch == my_arch) and arch not in config:
|
# if (isinstance(arch, basestring) or arch == my_arch) and arch not in config:
|
||||||
if scope is None:
|
if not config:
|
||||||
# We know no compilers were configured in any scope.
|
if scope is None:
|
||||||
init_compiler_config()
|
# We know no compilers were configured in any scope.
|
||||||
elif scope == 'user':
|
|
||||||
# Check the site config and update the user config if
|
|
||||||
# nothing is configured at the site level.
|
|
||||||
site_config = spack.config.get_config('compilers', scope='site')
|
|
||||||
if not site_config:
|
|
||||||
init_compiler_config()
|
init_compiler_config()
|
||||||
|
config = spack.config.get_config('compilers', scope=scope)
|
||||||
|
elif scope == 'user':
|
||||||
|
# Check the site config and update the user config if
|
||||||
|
# nothing is configured at the site level.
|
||||||
|
site_config = spack.config.get_config('compilers', scope='site')
|
||||||
|
if not site_config:
|
||||||
|
init_compiler_config()
|
||||||
|
config = spack.config.get_config('compilers', scope=scope)
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user