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

Update CMake flags for PyBind11 linking. #527

Merged
merged 3 commits into from
Feb 19, 2020
Merged
Changes from 1 commit
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
47 changes: 30 additions & 17 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Installation

## Prerequisites
## Clone the repo

Clone the develop branch, which contains the latest release
guacke marked this conversation as resolved.
Show resolved Hide resolved

```bash
git clone https://github.com/GQCG/GQCP.git --branch develop --single-branch --recurse-submodules
cd GQCP
```

## Install GQCG development environment
guacke marked this conversation as resolved.
Show resolved Hide resolved

Before installing GQCP, please make sure the following dependencies are available on your system:

Expand All @@ -24,26 +33,28 @@ If you use your own installation of libint, please set the `LIBINT_DATA_PATH` en

## CMake out-of-source build

For a default CMake build, the steps are the following:

1. clone the develop branch, which contains the latest release
Perform an out-of-source build:

```bash
git clone https://github.com/GQCG/GQCP.git --branch develop --single-branch --recurse-submodules
cd GQCP
```

2. perform an out-of-source build:
```bash
mkdir build && cd build
cmake .. (CMake options)
make && make test && sudo make install
```

```bash
mkdir build && cd build
cmake .. (CMake options)
make && make test && sudo make install
```
The possible CMake options are listed below. As such, for the provided GQCG environment this reduces to

The possible CMake options are listed below.
```bash
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH=${conda_install_dir}/envs/gqcg_dev \
-DCMAKE_INSTALL_PREFIX=~/.local \
-DBUILD_TESTS=TRUE \
-DBUILD_PYTHON_BINDINGS=TRUE \
-DPYTHON_EXECUTABLE=${conda_install_dir}/envs/gqcg_dev/bin/python \
-DPYTHON_LIBRARY=${conda_install_dir}/envs/gqcg_dev/lib/libpython3.8.a
make -j{CPU} && make test && (sudo) make install
```

## CMake options
### CMake options

In general, please set and pass the following options to the `cmake ..` command:

Expand Down Expand Up @@ -76,3 +87,5 @@ For this library, there are several extra options and configuration arguments yo
* `-DBUILD_PYTHON_BINDINGS=TRUE` makes sure that selected pieces of the GQCP library can be called from Python. This uses [PyBind11](https://github.com/pybind/pybind11), so make sure you have this installed if you wish to use GQCPY on your system.

* `-DPYTHON_EXECUTABLE=python_executable` with `python_executable` the path to your preferred Python executable.

* `-DPYTHON_LIBRARY=python_library` with `python_library` the path to the libraries that support your preferred Python executable.