Commit 52f6c942 authored by Rashad Kanavath's avatar Rashad Kanavath

COMP: cleanup find_shark (openmp controlled globally)

parent 256f237f
......@@ -110,27 +110,10 @@ string(REGEX MATCH
set(SHARK_USE_OPENMP FALSE CACHE BOOL "shark is built with OpenMP")
if(SHARK_USE_OPENMP_matched)
set(SHARK_USE_OPENMP TRUE CACHE BOOL "shark is built with OpenMP" FORCE)
endif()
#This is quick fix/hack/commit that will get back all failing tests on
# The good fix must to fix all those failing tests. They are crashing
# due to openmp issues which only popup with this fix
if(NOT WIN32)
if(SHARK_USE_OPENMP)
message(STATUS "Shark is built with OpenMP: SHARK_USE_OPENMP = TRUE")
find_package(OpenMP REQUIRED QUIET)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
else()
message(FATAL_ERROR "Your shark libraries are compiled with it OpenMP")
set(SHARK_FOUND FALSE)
endif()
else()
message(STATUS "Shark is built without OpenMP: SHARK_USE_OPENMP = FALSE")
endif()
endif(NOT WIN32)
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
......
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