Commit 44c03adb authored by Antoine Regimbeau's avatar Antoine Regimbeau

BUG: enable openMP flag if shark is built with openmp

parent 6b3198ce
...@@ -125,6 +125,13 @@ else() ...@@ -125,6 +125,13 @@ else()
set(REQUIRED_CBLAS_LIB) set(REQUIRED_CBLAS_LIB)
endif() endif()
if ( SHARK_USE_OPENMP AND NOT OTB_USE_OPENMP )
message(WARNING "Shark library is built with OpenMP and you have OTB_USE_OPENMP set to OFF.\
It will be turned to ON to allow compilation")
set( OTB_USE_OPENMP "ON" CACHE BOOL "Add openmp compiler and linker flags" FORCE )
endif()
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR ${REQUIRED_CBLAS_LIB} REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR ${REQUIRED_CBLAS_LIB}
......
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