Fixed architecture.py file so it doesn't have the weird merge changes i.e <<<HEAD etc. Also added target method of recognizing it's own architecture

This commit is contained in:
Mario Melara 2015-11-04 13:28:12 -08:00
parent 2bc73b4a27
commit b61d554dc8

View file

@ -86,20 +86,14 @@ def __init__(self, name):
self.name = name self.name = name
def add_target(self, name, target): def add_target(self, name, target):
<<<<<<< HEAD
target.set_architecture(self)
self.targets[name] = target
=======
"""Used by the architecture specific subclass to list available targets. Raises an error """Used by the architecture specific subclass to list available targets. Raises an error
if the architecture specifies a name that is reserved by spack as an alias. if the architecture specifies a name that is reserved by spack as an alias.
""" """
if name in ['front_end', 'fe', 'back_end', 'be', 'default']: if name in ['front_end', 'fe', 'back_end', 'be', 'default']:
raise ValueError("%s is a spack reserved alias and cannot be the name of a target" % name) raise ValueError("%s is a spack reserved alias and cannot be the name of a target" % name)
target.set_architecture(self)
self.targets[name] = target self.targets[name] = target
>>>>>>> 8b3f2ec1d117e1a8b206927f51db8684396c231b
def target(self, name): def target(self, name):
"""This is a getter method for the target dictionary that handles defaulting based """This is a getter method for the target dictionary that handles defaulting based
on the values provided by default, front-end, and back-end. This can be overwritten on the values provided by default, front-end, and back-end. This can be overwritten