From 2600efd9f41ca8005c9f9cb06e3c6e9f14d646c6 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Wed, 24 Oct 2018 17:46:36 +0200
Subject: [PATCH] BUG: #1753: adding options OTB_USE_MPI and OTB_USE_SPTW for
 superbuild

---
 SuperBuild/CMake/External_otb.cmake | 2 ++
 SuperBuild/CMakeLists.txt           | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/SuperBuild/CMake/External_otb.cmake b/SuperBuild/CMake/External_otb.cmake
index 621cf64550..9e0606dd01 100644
--- a/SuperBuild/CMake/External_otb.cmake
+++ b/SuperBuild/CMake/External_otb.cmake
@@ -216,6 +216,8 @@ ExternalProject_Add(OTB
   -DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
   -DOTB_WRAP_PYTHON3:BOOL=${OTB_WRAP_PYTHON3}
   -DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
+  -DOTB_USE_MPI:BOOL=${OTB_USE_MPI}
+  -DOTB_USE_SPTW:BOOL=${OTB_USE_SPTW}
   ${OTB_ADDITIONAL_CACHE}
   CMAKE_ARGS ${OTB_SB_CONFIG}
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
diff --git a/SuperBuild/CMakeLists.txt b/SuperBuild/CMakeLists.txt
index a4e5db17ac..514783bbd1 100644
--- a/SuperBuild/CMakeLists.txt
+++ b/SuperBuild/CMakeLists.txt
@@ -332,6 +332,9 @@ option(OTB_USE_SHARK "Enable module Shark in OTB" ON)
 option(OTB_USE_QWT "Enable module QWT in OTB" ON)
 option(OTB_USE_GSL "Enable module GSL in OTB" ON)
 
+option(OTB_USE_MPI "Enable MPI in OTB" OFF)
+option(OTB_USE_SPTW "Enable Simple Parallel Tiff Writer in OTB" OFF)
+
 # set OTB_DATA_ROOT to run test
 find_path(OTB_DATA_ROOT README-OTB-Data
   PATHS
-- 
GitLab