mirror of https://github.com/AlexeyAB/darknet.git
Merge pull request #5908 from TomHeaven/master
fix an openmp related error on macOS
This commit is contained in:
commit
fbe347a2fb
|
@ -210,8 +210,12 @@ if(ENABLE_CUDA)
|
|||
if(OpenCV_FOUND)
|
||||
set(ADDITIONAL_CXX_FLAGS "${ADDITIONAL_CXX_FLAGS} -DOPENCV")
|
||||
endif()
|
||||
if (APPLE)
|
||||
set(CUDA_HOST_COMPILER_FLAGS "--compiler-options \" ${ADDITIONAL_CXX_FLAGS} -fPIC -Xpreprocessor -fopenmp -Ofast \"")
|
||||
else()
|
||||
set(CUDA_HOST_COMPILER_FLAGS "--compiler-options \" ${ADDITIONAL_CXX_FLAGS} -fPIC -fopenmp -Ofast \"")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string (REPLACE ";" " " CUDA_ARCH_FLAGS_SPACE_SEPARATED "${CUDA_ARCH_FLAGS}")
|
||||
set(CMAKE_CUDA_FLAGS "${CUDA_ARCH_FLAGS_SPACE_SEPARATED} ${CUDA_HOST_COMPILER_FLAGS} ${CMAKE_CUDA_FLAGS}")
|
||||
|
|
Loading…
Reference in New Issue