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 d7f9e6d commit 02faa57Copy full SHA for 02faa57
CMake/Common.cmake
@@ -75,6 +75,10 @@ endif()
75
76
option(USE_OpenMP "Use OpenMP" ON)
77
if(USE_OpenMP)
78
+ # Add the default openmp installation directory for apple systems
79
+ if(APPLE)
80
+ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};/opt/homebrew/opt/libomp)
81
+ endif()
82
FIND_PACKAGE(OpenMP)
83
if(OPENMP_FOUND)
84
if (CMAKE_VERSION VERSION_GREATER "3.8")
@@ -83,6 +87,8 @@ if(USE_OpenMP)
87
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
88
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
85
89
endif()
90
+ else()
91
+ message("OpenMP could not be found. On Apple devices, make sure to install it with `brew install libomp`.")
86
92
93
94
0 commit comments