1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #23095 from fengyuentau:fix_omp_macos

* fix openmp include and link issue on macos

* turn off have_openmp if OpenMP_CXX_INCLUDE_DIRS is empty

* test commit

* use condition HAVE_OPENMP and OpenMP_CXX_LIBRARIES for linking

* remove trailing whitespace

* remove notes

* update conditions

* use OpenMP_CXX_LIBRARIES for linking
This commit is contained in:
Yuantao Feng
2023-01-16 17:44:13 +08:00
committed by GitHub
parent a9d02f096e
commit c63d79c5b1
3 changed files with 11 additions and 0 deletions
+3
View File
@@ -32,6 +32,9 @@ if(WITH_OPENMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if(DEFINED OpenMP_CXX_INCLUDE_DIRS AND OpenMP_CXX_INCLUDE_DIRS)
ocv_include_directories(${OpenMP_CXX_INCLUDE_DIRS})
endif()
endif()
set(HAVE_OPENMP "${OPENMP_FOUND}")
endif()