summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Melara <maamelara@gmail.com>2016-06-17 09:16:03 -0700
committerMario Melara <maamelara@gmail.com>2016-06-17 09:16:03 -0700
commitfe5eec5230dd86e2ed247a178a54230f631c1c60 (patch)
treed1062954c336f3235b9d7d900f7d1ce356dc7ef6
parentdf84fe0b58522597c9c16e59ceeabb9c3163c1ea (diff)
downloadspack-fe5eec5230dd86e2ed247a178a54230f631c1c60.tar.gz
spack-fe5eec5230dd86e2ed247a178a54230f631c1c60.tar.bz2
spack-fe5eec5230dd86e2ed247a178a54230f631c1c60.tar.xz
spack-fe5eec5230dd86e2ed247a178a54230f631c1c60.zip
'find and 'add' are options for adding compilers via command line
-rw-r--r--lib/spack/spack/cmd/compiler.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py
index 94d83512e1..3a496492ff 100644
--- a/lib/spack/spack/cmd/compiler.py
+++ b/lib/spack/spack/cmd/compiler.py
@@ -69,7 +69,7 @@ def setup_parser(subparser):
help="Configuration scope to read from.")
-def compiler_add(args):
+def compiler_find(args):
"""Search either $PATH or a list of paths OR MODULES for compilers and add them
to Spack's configuration."""
paths = args.add_paths
@@ -79,7 +79,6 @@ def compiler_add(args):
compilers = [c for c in spack.compilers.find_compilers(*args.add_paths)
if c.spec not in spack.compilers.all_compilers(scope=args.scope,
init_config=False)]
-
if compilers:
spack.compilers.add_compilers_to_config(compilers, scope=args.scope,
init_config=False)
@@ -139,9 +138,10 @@ def compiler_list(args):
def compiler(parser, args):
- action = { 'add' : compiler_add,
- 'remove' : compiler_remove,
- 'rm' : compiler_remove,
- 'info' : compiler_info,
- 'list' : compiler_list }
+ action = {'add' : compiler_find,
+ 'find' : compiler_find,
+ 'remove' : compiler_remove,
+ 'rm' : compiler_remove,
+ 'info' : compiler_info,
+ 'list' : compiler_list }
action[args.compiler_command](args)