How to compile OpenGeode

What do you need

OS

OpenGeode is supported and continuously tested on several platforms:

  • Windows - Visual Studio 2017
  • Ubuntu 18.04
  • RHEL 7 / CentOS 7
  • macOS X Catalina (10.15)

Pre-compiled binaries on these three platforms are also provided. This page describes where to download these binaries.

CMake

OpenGeode comes with a CMake configuration file. You can modify two items:

  • CMAKE_BUILD_TYPE: choose build configuration (Release, Debug). By default Release.
  • OPENGEODE_WITH_TESTS: switch on/off the OpenGeode test environment.

Your version of CMake should be at least 3.11.

Compiler

On Windows, we recommend to use Visual Studio 15 2017. On Linux, you can use gcc/g++ as compiler. You need a version equal to or higher than 4.8. On macOS, install Mac OS "Command Line Developer Tools" and use clang. On macOS you can also use Xcode as an IDE which uses clang.

OpenGeode configuration and compilation

The configuration and compilation of OpenGeode are very simple. They can be achieved in few steps depending on your platform.

On Windows

Configuration

  1. Launch CMake interface.
  2. Set where is the OpenGeode source code and where to build the binaries as path/to/OpenGeode/build.
  3. Choose your configuration options. Take care to choose as current generator `Visual Studio 15 2017`.
  4. Launch the configure and generate option.

Compilation

  1. Click on `Open Project` in the CMake interface. It opens Visual Studio 2017 and the generated solution.
  2. Build the solution.

That's all! You are ready to work with OpenGeode.

On Linux

Configuration

  1. Open a terminal where is the OpenGeode source code.
  2. Create a `build` directory: mkdir build; cd build
  3. Run cmake: cmake .. for default configuration or ccmake .. or cmake-gui .. to modify configuration options.

Compilation

  1. Run `make` command in the build directory.

Now you are ready to work with OpenGeode.

On macOS

Configuration

  1. Open a terminal where is the OpenGeode source code.
  2. Create a `build` directory: mkdir build; cd build
  3. Run cmake: cmake .. for default configuration or ccmake .. or cmake-gui .. to modify configuration options.

If you want to use Xcode, we suggest you to use CMake GUI interface to select Xcode as generator (or use cmake options "-G Xcode" command lines).

Compilation without Xcode (Clang in command line)

  1. Run `make` command in the build directory.

Compilation with Xcode

  1. Open the project "SuperBuild.xcodeproj" with Xcode: `open SuperBuild.xcodeproj`, and then compile using the graphical interface.

Or, you can directly compile with the terminal: `xcodebuild -project SuperBuild.xcodeproj -alltargets -configuration Release`. Replace "Release" by "Debug" to compile in debug mode.

Now you are ready to work with OpenGeode.