compiler: make default openmp_flag() and cxx11_flag() die when these properties are not implemented in a derived class

This commit is contained in:
Denis Davydov 2016-05-03 18:04:08 +02:00
parent 30b65d3114
commit 473a5542be

View File

@ -120,19 +120,20 @@ def check(exe):
def version(self): def version(self):
return self.spec.version return self.spec.version
# Default implementation of OpenMP linking flag. # This property should be overridden in the compiler subclass if
# Override in derived classes if needed # OpenMP is supported by that compiler
@property @property
def openmp_flag(self): def openmp_flag(self):
return "-fopenmp" # If it is not overridden, assume it is not supported and warn the user
tty.die("The compiler you have chosen does not currently support OpenMP. If you think it should, please edit the compiler subclass and submit a pull request or issue.")
# Default implementation of c++11 linking flag. # This property should be overridden in the compiler subclass if
# Override in derived classes if needed # C++11 is supported by that compiler
@property @property
def cxx11_flag(self): def cxx11_flag(self):
return "-std=c++11" # If it is not overridden, assume it is not supported and warn the user
tty.die("The compiler you have chosen does not currently support C++11. If you think it should, please edit the compiler subclass and submit a pull request or issue.")
# #
# Compiler classes have methods for querying the version of # Compiler classes have methods for querying the version of