From ee043e0b3631d837cab26f2f5bcaaaefc9b9f8e3 Mon Sep 17 00:00:00 2001
From: Rashad Kanavath <rashad.kanavath@c-s.fr>
Date: Mon, 28 Aug 2017 10:40:56 +0200
Subject: [PATCH] COMP: openmp is disabled by default (OTB & SuperBuild)

---
 CMakeLists.txt            | 4 ++--
 SuperBuild/CMakeLists.txt | 7 +------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e394fc496d..1753c49c50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -213,8 +213,8 @@ endif()
 option(OTB_USE_DEPRECATED "Turn on the use and test of deprecated classes" OFF)
 mark_as_advanced(OTB_USE_DEPRECATED)
 
-option(OTB_USE_OPENMP "Add openmp compiler and linker flags" ON)
-option(OTB_USE_SSE_FLAGS "Enable SIMD optimizations (hardware dependant)." OFF)
+option(OTB_USE_OPENMP "Add openmp compiler and linker flags" OFF)
+option(OTB_USE_SSE_FLAGS "Enable SIMD optimizations (hardware dependant)." ON)
 #-----------------------------------------------------------------------------
 # SHOW_ALL_MSG_DEBUG option
 option(OTB_SHOW_ALL_MSG_DEBUG "Show all debug messages (very verbose)" OFF)
diff --git a/SuperBuild/CMakeLists.txt b/SuperBuild/CMakeLists.txt
index e36f7ada41..772c5126d3 100644
--- a/SuperBuild/CMakeLists.txt
+++ b/SuperBuild/CMakeLists.txt
@@ -49,14 +49,9 @@ endif()
 option(BUILD_SHARED_LIBS "Build OTB with shared libraries." ON)
 option(BUILD_STATIC_LIBS "Build with static libraries." OFF)
 option(WITH_REMOTE_MODULES "Build with specific list of remote modules." OFF)
+option(OTB_USE_OPENMP "use openmp" OFF)
 set(OTB_ADDITIONAL_CACHE "" CACHE STRING "Additional cmake option for OTB -DVAR:TYPE=VALUE ...")
 
-option(OTB_USE_OPENMP "use openmp" ON)
-if(WIN32)
-  option(OTB_USE_OPENMP "use openmp" OFF)
-endif()
-
-
 if(APPLE)
   if(POLICY CMP0042)
     cmake_policy(SET CMP0042 NEW)
-- 
GitLab