summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2016-05-03 17:26:43 +0200
committerDenis Davydov <davydden@gmail.com>2016-05-05 10:44:41 +0200
commitd5a760776a47552aab7b8575e7ad9ac9eaba9384 (patch)
tree638a3eaeba06584b807a3ac95e0e99190da932f6 /lib
parent6a418cfb8d60a26d1195aeb74b2d54ae9cb38616 (diff)
downloadspack-d5a760776a47552aab7b8575e7ad9ac9eaba9384.tar.gz
spack-d5a760776a47552aab7b8575e7ad9ac9eaba9384.tar.bz2
spack-d5a760776a47552aab7b8575e7ad9ac9eaba9384.tar.xz
spack-d5a760776a47552aab7b8575e7ad9ac9eaba9384.zip
compiler: add default implementation of openmp_flag() and css11_flag()
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compiler.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py
index 20896f9eec..a707b2e3aa 100644
--- a/lib/spack/spack/compiler.py
+++ b/lib/spack/spack/compiler.py
@@ -120,6 +120,20 @@ class Compiler(object):
def version(self):
return self.spec.version
+ # default implementation of OpenMP linking flag.
+ # Override in derived classes if needed
+ @property
+ def openmp_flag(self):
+ return "-fopenmp"
+
+
+ # default implementation of c++11 linking flag.
+ # raise an error to force derived classes implement it when used
+ @property
+ def cxx11_flag(self):
+ return "-std=c++11"
+
+
#
# Compiler classes have methods for querying the version of
# specific compiler executables. This is used when discovering compilers.