Commit 74c8b0a7 authored by Rashad Kanavath's avatar Rashad Kanavath

ENH: control openmp flag globally

parent 8a011b59
......@@ -28,11 +28,6 @@ ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GDAL OSSIM ITK TINYXML BOOST)
##get_property(OTB_DEPENDENCIES GLOBAL PROPERTY GLOBAL_OTB_DEPENDENCIES)
set(OTB_USE_OPENMP TRUE)
if(WIN32)
set(OTB_USE_OPENMP FALSE)
endif()
if(OTB_USE_CURL)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB CURL)
ADD_SUPERBUILD_CMAKE_VAR(OTB CURL_INCLUDE_DIR)
......
......@@ -28,15 +28,6 @@ ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(SHARK BOOST)
ADD_SUPERBUILD_CMAKE_VAR(SHARK Boost_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(SHARK BOOST_LIBRARYDIR)
#set(SHARK_CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS})
# if(LINUX)
# string(REGEX REPLACE
# "-Wl,--no-undefined"
# "-Wl,--no-undefined -Wl,-no-as-needed"
# SHARK_CMAKE_CACHE_ARGS
# "${SHARK_CMAKE_CACHE_ARGS}")
# endif()
ExternalProject_Add(SHARK
PREFIX SHARK
URL "https://github.com/Shark-ML/Shark/archive/349f29bd71c370e0f88f7fc9aa66fa5c4768fcb0.zip"
......@@ -53,6 +44,7 @@ ExternalProject_Add(SHARK
-DBUILD_TESTING:BOOL=OFF
-DENABLE_HDF5:BOOL=OFF
-DENABLE_CBLAS:BOOL=OFF
-DENABLE_OPENMP:BOOL=${OTB_USE_OPENMP}
${SHARK_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
LOG_DOWNLOAD 1
......
......@@ -51,6 +51,12 @@ option(BUILD_STATIC_LIBS "Build with static libraries." OFF)
option(WITH_REMOTE_MODULES "Build with specific list of remote modules." 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment