Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for preconfigured libcantera-devel samples #225

Merged
merged 1 commit into from
Sep 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions pages/install/conda-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,38 @@ Installation folders for the C++ and Fortran 90 interface are:
samples path/to/conda/envs/ct-dev/share/cantera/samples
data files path/to/conda/envs/ct-dev/share/cantera/data

In addition to ``libcantera-devel``, installation of additional packages is recommended:

.. code:: shell

$ conda activate ct-dev
$ conda install make cmake scons pkg-config

C++ programs can be compiled according to instructions outlined in the
:ref:`C++ Guide <sec-compiling-cplusplus>`. As an example, individual Cantera sample
programs can be compiled as follows using the ``pkg-config`` build system:
:ref:`C++ Guide <sec-compiling-cplusplus>`. Sample folders for C++ and Fortran include
preconfigured instruction files to facilitate compilation using the build tools
``Make``, ``SCons`` and ``CMake``, for example:

.. code:: shell

$ cd /path/to/conda/envs/ct-dev/share/cantera/samples/cxx/demo
$ make # uses Makefile; or
$ scons # uses SConstruct; or
$ cmake . && cmake --build . # uses CMakeLists.txt

In addition, individual C++ Cantera sample programs can also be compiled using the
``pkg-config`` build system:

.. code:: shell

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/conda/envs/ct-env/lib
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/path/to/conda/envs/ct-env/lib/pkgconfig
$ cd /path/to/conda/envs/ct-env/share/cantera/samples/cxx/demo
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/conda/envs/ct-dev/lib
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/path/to/conda/envs/ct-dev/lib/pkgconfig
$ g++ demo.cpp -o demo $(pkg-config --cflags --libs cantera)

In all cases, the build process yields the executable ``demo``, which is run as:

.. code:: shell

$ ./demo

Windows Systems
Expand Down