How to compile OpenGeode
What do you need
OS
OpenGeode is supported and continuously tested on several platforms:
- Windows - Visual Studio 2022
- Ubuntu 22.04
- RHEL 8 / Alma 8
Pre-compiled binaries on these platforms are also provided. This page describes where to download these binaries.
Development tools
CMake
OpenGeode comes with a CMake configuration file. You can modify three items:
CMAKE_BUILD_TYPE
: choose build configuration (Release, Debug). By default Release.OPENGEODE_WITH_TESTS
: switch on/off the OpenGeode test environment.OPENGEODE_WITH_PYTHON
: switch on/off the OpenGeode Python binding (see this page for usage).
Your version of CMake should be at least 3.19.
Compiler
On Windows, we recommend using Visual Studio 17 2022. On Linux, you can use gcc/g++ as a compiler. You need a version supporting C++17.
Git
You need git to clone OpenGeode's dependency repositories during configuration.
OpenGeode configuration and compilation
The configuration and compilation of OpenGeode are straightforward. They can be achieved in a few steps depending on your platform.
On Windows
Configuration
- Launch CMake interface.
- Set where is the OpenGeode source code and where to build the binaries as
path/to/OpenGeode/build
. - Choose your configuration options. Take care to choose as the current generator
Visual Studio 15 2017
. - Launch the configure and generate option.
Compilation
- Click on
Open Project
in the CMake interface. It opens Visual Studio 2017 and the generated solution. - Build the solution.
That's all! You are ready to work with OpenGeode.
On Linux
Configuration
- Open a terminal where is the OpenGeode source code.
- Create a
build
directory:mkdir build; cd build
. - Run cmake:
cmake ..
for default configuration orccmake ..
orcmake-gui ..
to modify configuration options.
Compilation
- Run
make
command in the build directory.
Now you are ready to work with OpenGeode.