Skip to content

Commit

Permalink
environment variable doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bpuchala committed Jul 26, 2024
1 parent 477b343 commit 0523ddb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions python/doc/usage/cluster_expansion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ The :func:`~libcasm.clexulator.make_cluster_expansion` method can be used to con
export CASM_PREFIX=$(python -m libcasm.casmglobal --prefix)
In some cases, finer control of compilation and linking options may be necessary, which can be done as described in the :class:`~libcasm.clexulator.make_clexulator` documentation. For example, compiling and linking with gcc may require:
In some cases, finer control of compilation and linking options may be necessary, which can be done as described in the :class:`~libcasm.clexulator.make_clexulator` documentation. For example, compiling and linking on some Linux distros may require one or both of the "-D_GLIBCXX_USE_CXX11_ABI=0" and "--no-as-needed" flags. These can be set in the environment variables ``CASM_CXXFLAGS`` and ``CASM_SOFLAGS`` respectively:

.. code-block:: bash
export CASM_SOFLAGS="-shared -Wl,--no-as-needed"
export CASM_CXXFLAGS="-O3 -Wall -fPIC --std=c++17 -D_GLIBCXX_USE_CXX11_ABI=0 "
.. code-block:: bash
export CASM_SOFLAGS="-shared -Wl,--no-as-needed"
.. code-block:: Python
Expand Down
6 changes: 3 additions & 3 deletions python/src/clexulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ PYBIND11_MODULE(_clexulator, m) {
compile_options: str = None
Options used to compile the Clexulator source file, if it is not yet
compiled. Example: "g++ -O3 -Wall -fPIC --std=c++17 -I/path/to/include".
The default values can be configured with:
The default values can be configured by setting environment variables:
CASM_CXX:
Set compiler; default="g++"
Expand All @@ -1177,7 +1177,7 @@ PYBIND11_MODULE(_clexulator, m) {
Options used to compile the Clexulator shared object file, if it is not
yet compiled. Example: "g++ -shared -L/path/to/lib -lcasm_clexulator "
The default values can be configured with:
The default values can be configured by setting environment variables:
CASM_CXX:
Set compiler; default="g++"
Expand All @@ -1186,7 +1186,7 @@ PYBIND11_MODULE(_clexulator, m) {
CASM_LIBDIR:
Set link search path, overriding CASM_PREFIX
CASM_PREFIX:
Set include search path to -L$CASM_PREFIX/lib; default
Set library search path to -L$CASM_PREFIX/lib; default
tries to find "ccasm" or "casm" executables on PATH and
checks relative locations
Expand Down

0 comments on commit 0523ddb

Please sign in to comment.