Skip to content

Commit

Permalink
disable -> enable docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mberaha committed Jul 5, 2022
1 parent 2ae08f1 commit 75453ec
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ option(DISABLE_TESTS
"If tests should be compiled or no" OFF)
option(DISABLE_BENCHMARKS
"If benchmarks should be compiled or no" OFF)
option(DISABLE_DOCS
option(ENABLE_DOCS
"If docs should be generated or no" OFF)
option(BUILD_RUN "" ON)

Expand Down Expand Up @@ -167,7 +167,7 @@ if (NOT DISABLE_BENCHMARKS)
add_subdirectory(benchmarks)
endif()

if (NOT DISABLE_DOCS)
if (ENABLE_DOCS)
add_subdirectory(docs)
endif()

Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ For descriptions of the models supported in our library, discussion of software

## For end users

**Warning**: make sure you have a recent version of `cmake` installed (at least 3.20.x) or install `protobuf` beforehand (see the section for developers)!
**Prerequisites**: to build `bayesmix` you will need `git`, `pkg-config` and a recent version of `cmake`.
On Linux machines, it is sufficient to run

```
apt-get -y update && apt-get install -y
apt-get -y install git
apt-get -y install python3-pip
python3 -m pip install cmake
apt-get install -yq pkg-config
```

On macOS, after install HomeBrew, replace `apt-get -y` with `brew`.

To install and use `bayesmix`, please `cd` to the folder to which you wish to install it, and clone this repository with the following command-line instruction:

Expand All @@ -37,7 +48,7 @@ To build the executable for the main file `run_mcmc.cc`, please use the followin
```shell
mkdir build
cd build
cmake .. -DDISABLE_DOCS=ON -DDISABLE_BENCHMARKS=ON -DDISABLE_TESTS=ON
cmake .. -DDISABLE_DOCS=ON -DDISABLE_BENCHMARKS=ON
make run_mcmc
cd ..
```
Expand Down Expand Up @@ -92,6 +103,16 @@ The corresponding executable is located at `build/test/test_bayesmix`.

Documentation is available at https://bayesmix.readthedocs.io.

To build the documentation locally, make sure to have installed `Doxygen`, `sphinx`, and `docker`. Then

```shell
cd build
cmake .. -DENABLE_DOCS=ON
make document_bayesmix
```

will generete Sphinx documentation files in `build/docs/sphinx`. You can use a web browser to open the file `index.html`.

# Contributions are welcome!

Please check out [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to collaborate with us.
Expand Down

0 comments on commit 75453ec

Please sign in to comment.