We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45f1683 commit e8766b0Copy full SHA for e8766b0
CMake/Common.cmake
@@ -74,6 +74,10 @@ endif()
74
75
option(USE_OpenMP "Use OpenMP" ON)
76
if(USE_OpenMP)
77
+ # Add the default openmp installation directory for apple systems
78
+ if(APPLE)
79
+ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};/opt/homebrew/opt/libomp)
80
+ endif()
81
FIND_PACKAGE(OpenMP)
82
if(OPENMP_FOUND)
83
if (CMAKE_VERSION VERSION_GREATER "3.8")
@@ -82,6 +86,8 @@ if(USE_OpenMP)
86
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
87
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
84
88
endif()
89
+ else()
90
+ message("OpenMP could not be found. On Apple devices, make sure to install it with `brew install libomp`.")
85
91
92
93
0 commit comments