Skip to content

Commit

Permalink
Add instructions for preconfigured build configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Aug 14, 2022
1 parent 129e2a9 commit bbd7571
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions pages/install/conda-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Windows), create a new conda environment named ``ct-dev`` using:

.. code:: shell
conda create --name ct-dev --channel cantera/label/dev libcantera-devel
conda create --name ct-dev --channel cantera/label/dev libcantera-devel make scons cmake pkg-config
This will create an environment with Cantera's development interface. In this case,
the addition of ``--channel cantera/label/dev`` ensures that the package is pulled
Expand All @@ -249,15 +249,30 @@ Installation folders for the C++ and Fortran 90 interface are:
data files path/to/conda/envs/ct-dev/share/cantera/data
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-env/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
$ 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

0 comments on commit bbd7571

Please sign in to comment.