Skip to content

Commit 1779f1e

Browse files
authored
Update detect_dependencies.cmake
1 parent bb50f0f commit 1779f1e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cmake/detect_dependencies.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ if(APPLE AND CMAKE_HOST_APPLE)
8484
endif()
8585

8686
# If OpenMP wasn't found, try if we can find it in the default Homebrew location (for newer homebrew setups)
87-
if((NOT OPENMP_FOUND) AND(NOT OPENMP_CXX_FOUND) AND EXISTS "/opt/homebrew/opt/libomp/lib")
88-
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include")
87+
if((NOT OPENMP_FOUND) AND(NOT OPENMP_CXX_FOUND) AND EXISTS "/opt/homebrew/opt/libomp/lib/libomp.dylib")
88+
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include")
8989
set(OpenMP_CXX_LIB_NAMES omp)
90-
set(OpenMP_omp_LIBRARY /opt/homebrew/opt/libomp/lib)
90+
set(OpenMP_omp_LIBRARY /opt/homebrew/opt/libomp/lib/libomp.dylib)
9191

9292
find_package(OpenMP)
9393

@@ -98,7 +98,6 @@ if(APPLE AND CMAKE_HOST_APPLE)
9898
endif()
9999
endif()
100100

101-
102101
set(Additional_OpenMP_Libraries_Workaround "")
103102

104103
# Workaround because older cmake on apple doesn't support FindOpenMP

0 commit comments

Comments
 (0)