summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2016-05-05 11:56:58 +0200
committerDenis Davydov <davydden@gmail.com>2016-05-05 11:56:58 +0200
commitc37ea9aff548bfdf106aa141b8d6e6adec2ffd01 (patch)
treeb67f81e1f2ca423fb54627fb67e57600bafed813 /lib
parentf84f04591be44ba6c1aa5bef50d5efa872cfb1c9 (diff)
downloadspack-c37ea9aff548bfdf106aa141b8d6e6adec2ffd01.tar.gz
spack-c37ea9aff548bfdf106aa141b8d6e6adec2ffd01.tar.bz2
spack-c37ea9aff548bfdf106aa141b8d6e6adec2ffd01.tar.xz
spack-c37ea9aff548bfdf106aa141b8d6e6adec2ffd01.zip
document usage of compiler flags properties
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/packaging_guide.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index 34d11308f5..31c676d4f5 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -1831,6 +1831,25 @@ successfully find ``libdwarf.h`` and ``libdwarf.so``, without the
packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on
the command line.
+Compiler flags
+~~~~~~~~~~~~~~
+In rare circumstances such as compiling and running small unit tests, a package
+developer may need to know what are the appropriate compiler flags to enable
+features like ``OpenMP``, ``c++11``, ``c++14`` and alike. To that end the
+compiler classes in ``spack`` implement the following _properties_ :
+``openmp_flag``, ``cxx11_flag``, ``cxx14_flag``, which can be accessed in a
+package by ``self.compiler.cxx11_flag`` and alike. Note that the implementation
+is such that if a given compiler version does not support this feature, an
+error will be produced. Therefore package developers can also use these properties
+to assert that a compiler supports the requested feature. This is handy when a
+package supports additional variants like
+
+.. code-block:: python
+
+ variant('openmp', default=True, description="Enable OpenMP support.")
+
+
+
Message Parsing Interface (MPI)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is common for high performance computing software/packages to use ``MPI``.