Add --show-full-compiler option to 'spack find'
When 'spack find' is invoked with the '--show-full-compiler' option, the compiler flags and version are shown for each spec that is found.
This commit is contained in:

committed by
scheibelp

parent
005b22aa8b
commit
c94933343a
@@ -211,6 +211,7 @@ def get_arg(name, default=None):
|
||||
hashes = get_arg('long', False)
|
||||
namespace = get_arg('namespace', False)
|
||||
flags = get_arg('show_flags', False)
|
||||
full_compiler = get_arg('show_full_compiler', False)
|
||||
variants = get_arg('variants', False)
|
||||
|
||||
hlen = 7
|
||||
@@ -219,7 +220,12 @@ def get_arg(name, default=None):
|
||||
hlen = None
|
||||
|
||||
nfmt = '.' if namespace else '_'
|
||||
ffmt = '$%+' if flags else ''
|
||||
ffmt = ''
|
||||
if full_compiler or flags:
|
||||
ffmt += '$%'
|
||||
if full_compiler:
|
||||
ffmt += '@'
|
||||
ffmt += '+'
|
||||
vfmt = '$+' if variants else ''
|
||||
format_string = '$%s$@%s%s' % (nfmt, ffmt, vfmt)
|
||||
|
||||
@@ -259,7 +265,7 @@ def get_arg(name, default=None):
|
||||
|
||||
elif mode == 'short':
|
||||
# Print columns of output if not printing flags
|
||||
if not flags:
|
||||
if not flags and not full_compiler:
|
||||
|
||||
def fmt(s):
|
||||
string = ""
|
||||
|
@@ -60,6 +60,10 @@ def setup_parser(subparser):
|
||||
action='store_true',
|
||||
dest='show_flags',
|
||||
help='show spec compiler flags')
|
||||
subparser.add_argument('--show-full-compiler',
|
||||
action='store_true',
|
||||
dest='show_full_compiler',
|
||||
help='show full compiler specs')
|
||||
implicit_explicit = subparser.add_mutually_exclusive_group()
|
||||
implicit_explicit.add_argument(
|
||||
'-e', '--explicit',
|
||||
|
Reference in New Issue
Block a user