Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: automatically find openmp based on homebrew prefix, close #110 #163

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ set ( PRJ_INCLUDE_DIRS )
# openmp
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES Darwin)
execute_process(COMMAND brew install libomp)
list ( APPEND PRJ_LIBRARIES /usr/local/opt/libomp/lib )
list ( APPEND PRJ_INCLUDE_DIRS /usr/local/opt/libomp/include )
execute_process(COMMAND brew --prefix OUTPUT_VARIABLE HOMEBREW_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
list ( APPEND PRJ_LIBRARIES ${HOMEBREW_PREFIX}/opt/libomp/lib )
list ( APPEND PRJ_INCLUDE_DIRS ${HOMEBREW_PREFIX}/opt/libomp/include )
else()
find_package ( OpenMP )
if ( OpenMP_FOUND )
Expand Down
Loading