Skip to content

Commit

Permalink
doc: cleanup setup guide
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks authored Jan 16, 2024
1 parent d9bcdc0 commit 74d21a0
Showing 1 changed file with 24 additions and 34 deletions.
58 changes: 24 additions & 34 deletions doc/setup.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,45 @@
# Setup Guide

**Table of Contents**
1. [Dependencies](#dependencies)
1. [Building and Installing](#building)
1. [Environment Variables (optional)](#env)
| **Table of Contents** |
| --- |
| [Dependencies](#dependencies) |
| [Building and Installing](#building) |
| [Environment Variables (optional)](#env) |

<a name="dependencies"></a>
## Dependencies

The following sections list the dependencies and how to obtain them.

> [!IMPORTANT]
> If you obtain a dependency with `git clone`, it is strongly recommended to checkout a recent tag,
> rather than using the most recent version on the main branch. For example, to use version `10.2.0`
> of `fmt`, run (while in the `fmt` repository directory):
> ```bash
> git checkout 10.2.0
> ```
> See the list of tags in chronological order (latest is first) by running:
> ```bash
> git log --tags --decorate --simplify-by-decoration --oneline
> ```
> [!TIP]
> - It's generally better to use your a package manager to install dependencies, _e.g._:
> - `brew install <package>` macOS
> - `apt install <package>`, `dnf install <package>`, `pacman -S <package` on Linux
> - The name of the package may be different for different package managers; search for and read about the package before installing it
> - If you obtain a dependency from Github (or similar), it's best practice to obtain a recent tag rather than the latest version on the main branch:
> ```
> git log --tags --decorate --simplify-by-decoration --oneline # list all the tags (latest first)
> git checkout 1.0.0 # checkout the tag '1.0.0'
> ```
### :large_orange_diamond: `meson`: Build system used by `iguana`
<https://mesonbuild.com/>
- likely available in your package manager
- you may also install `meson` (and `ninja`) with `pip`:
- Likely available in your package manager, but the latest version is preferred and may be installed with `pip`:
```bash
python -m pip install meson ninja
```
This includes [`ninja`](https://ninja-build.org/), which `meson` will benefit from using.

### :large_orange_diamond: `fmt`: C++ output formatting library
<https://github.com/fmtlib/fmt>
- likely available in your package manager, likely as `fmt` or `libfmt`
> [!IMPORTANT]
> macOS users are _strongly_ encouraged to install this from Homebrew:
> ```bash
> brew install fmt
> ```
- if you compile it yourself, include the `cmake` option `-DCMAKE_POSITION_INDEPENDENT_CODE=ON`
- example `cmake` commands:
```bash
cmake -S /path/to/fmt_source_code -B build-fmt -DCMAKE_INSTALL_PREFIX=/path/to/fmt_installation -DCMAKE_POSITION_INDEPENDENT_CODE=ON
cmake --build build-fmt -j$(nproc)
cmake --install build-fmt
```
- Likely available in your package manager, likely as `fmt` or `libfmt`
- If you need Python bindings on macOS, please install `fmt` with `brew install fmt`
- If you compile it yourself on Linux, include the `cmake` option `-DCMAKE_POSITION_INDEPENDENT_CODE=ON` to build the static library

### :large_orange_diamond: `hipo`: C++ HIPO API
<https://github.com/gavalian/hipo>
- use the `hipo` module on `ifarm`, or obtain and build it yourself
- example `cmake` commands:
- Use the `hipo` module on `ifarm`, or obtain and build it yourself
- Example `cmake` commands:
```bash
cmake -S /path/to/hipo_source_code -B build-hipo -DCMAKE_INSTALL_PREFIX=/path/to/hipo_installation
cmake --build build-hipo -j$(nproc)
Expand Down Expand Up @@ -112,7 +102,7 @@ meson install -C build-iguana
## Environment Variables (optional)
The C++ `iguana` implementation does not require the use of any environment variables. However,
- some language bindings may benefit from variables such as `$PYTHONPATH`, for Python
- you may want to override the `ld` library search path list (_e.g._, if you have conflicting libraries in it)
- you may want to override the linker library search path list (_e.g._, if you have conflicting libraries in it)

You may set your own environment variables, but for a quick start with suggested settings,
the installed file `bin/this_iguana.sh` may be used as
Expand All @@ -135,4 +125,4 @@ which sets or modifies the following environment variables:
| `PYTHONPATH` | adds paths to dependency and `iguana` Python packages, if Python bindings are installed |
| `LD_LIBRARY_PATH` (Linux) or `DYLD_LIBRARY_PATH` (macOS) | adds paths to dependency and `iguana` libraries, if the optional argument `ld` was used |

`this_iguana.sh` is compatible with `bash` and `zsh, but not with `tcsh` or `csh`.
`this_iguana.sh` is compatible with `bash` and `zsh`, but not with `tcsh` or `csh`.

0 comments on commit 74d21a0

Please sign in to comment.