Compilation Options

This page shows advanced options to customize your Open3D build. For quick start, see Compiling from source.

Python binding

We use pybind11 to build the Python binding. It tries to automatically detect the installed version of Python and link against that. When this fails, or when there are multiple versions of Python and it finds the wrong one, delete CMakeCache.txt and then invoke CMake as follows:

cmake -DPYTHON_EXECUTABLE:FILEPATH=<path-to-python-executable> ../src


Python binding issues can also refer to pybind11 document page.

If you do not want Python binding, turn off the compilation options Open3D_BUILD_PYTHON_BINDING and Open3D_BUILD_PYTHON_BINDING_TESTS.


On Windows, all dependent libraries are built from source code. Dependencies are included in src/External folder.

On Linux and OS X, the default behavior of Open3D is to find packages installed on the OS and link to them. If the required package(s) is not found, it is built from source code. This avoids compilation of dependent libraries as much as possible, and thus significantly reduces compilation time. However, sometimes there can be compatibility issues due to version conflict. In this case, you can manual turn off the compilation option Open3D_USE_NATIVE_DEPENDENCY_BUILD to force building dependent libraries from source code:



We automatically detect if the C++ compiler supports OpenMP and compile Open3D with it if the compilation option Open3D_USE_OPENMP is ON. OpenMP can greatly accelerate computation on a multi-core CPU.

The default LLVM compiler on OS X does not support OpenMP. A workaround is to install a C++ compiler with OpenMP support, such as gcc, then use it to compile Open3D. For example, starting from a clean build directory, run

brew install gcc --without-multilib
cmake -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6 ../src
make -j


This workaround has some compatibility issues with the source code of GLFW included in src/External. Make sure Open3D is linked against GLFW installed on the OS.

Unit testing


Work in progress!

  • Unit test coverage: low.
  • Tested on: macOS and Ubuntu.

Unit testing is based on Google Test. By default unit tests are turned off. In order to enable them follow the next steps:

  1. Download/Build/Install Google Test.
  2. Set the Open3D_BUILD_UNIT_TESTS flag to ON.
cd util/scripts

cd <path_to_Open3D>
mkdir build
cd build
cmake ../src -DOpen3D_BUILD_UNIT_TESTS=ON
make -j

In order to perform the unit tests:

cd util/scripts


Documentation is written in reStructuredText and compiled with sphinx. From docs folder, run

pip install sphinx sphinx-autobuild sphinx-rtd-theme
make html

Documentation for C++ API is made with Doxygen. Follow the Doxygen installation instruction. From Open3D root folder, run

doxygen Doxyfile