Skip to content

Make the CookBook a CMake target

Victor Poughon requested to merge cookbook-make-target into develop

Summary

Building the cookbook is currently a separate CMake project which requires boilerplate configuration (OTB_DIR, etc...). There is no proper CMake dependency between the OTB build and the cookbook, leading to errors when not rebuilding the correct git branch, etc...

In this MR I:

  • Add the cookbook to the main CMakeLists.txt with add_subdirectory
  • Port the cookbook build system to Python 3 (and drop Python 2 support)

You can now build the cookbook in your usual OTB build dir simply with:

cmake -DBUILD_DOCUMENTATION .
make CookBookHTML
firefox Documentation/Cookbook/html/index.html

Rationale

Easier CookBook build and better dependency management.

Implementation Details

  • The BUILD_DOCUMENTATION CMake variable is useful because the configure step looks for Latex, Sphinx, etc, and we want to be able to completely disable it. But do we want BUILD_DOXYGEN, BUILD_COOKBOOK, BUILD_SOFTWAREGUIDE...?

  • I made sphinx_rtd_theme a mandatory build dependency (it was optional), so the final result is the same everywhere.

Documentation
  • Should document somewhere the list of build dependencies for the various OTB documentation (Sphinx, latex, etc.)

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
Edited by Victor Poughon

Merge request reports