summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew LeGendre <legendre1@llnl.gov>2014-03-14 11:33:37 -0700
committerMatthew LeGendre <legendre1@llnl.gov>2014-03-14 11:33:37 -0700
commit6147d52f2d4dbb5ec111736eabf05660be6c2cdd (patch)
tree24c69349bc679db7ebbe14911c0f66a810990991
parent008d7a316216ab086aa8954854a125c66f094d46 (diff)
parent40cda9fa9cb1fe89f85ccd7cd56f0d98e403c5bf (diff)
downloadspack-6147d52f2d4dbb5ec111736eabf05660be6c2cdd.tar.gz
spack-6147d52f2d4dbb5ec111736eabf05660be6c2cdd.tar.bz2
spack-6147d52f2d4dbb5ec111736eabf05660be6c2cdd.tar.xz
spack-6147d52f2d4dbb5ec111736eabf05660be6c2cdd.zip
Merge branch 'version_opt' into spindle
-rwxr-xr-xlib/spack/env/cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 0245e06531..47a5bcf900 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -28,7 +28,7 @@ spack_env_path = get_path("SPACK_ENV_PATH")
# Figure out what type of operation we're doing
command = os.path.basename(sys.argv[0])
-cpp, cc, ccld, ld = range(4)
+cpp, cc, ccld, ld, version_check = range(5)
if command == 'cpp':
mode = cpp
elif command == 'ld':
@@ -40,6 +40,9 @@ elif '-c' in sys.argv:
else:
mode = ccld
+if '-V' in sys.argv or '-v' in sys.argv or '--version' in sys.argv:
+ mode = version_check
+
# Parse out the includes, libs, etc. so we can adjust them if need be.
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument("-I", action='append', default=[], dest='include_path')