Skip to content

Commit

Permalink
Add link option for Apple Clang
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfan1996 committed Oct 11, 2022
1 parent 077defb commit 5ab41b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ if ("${CMAKE_C_COMPILER_ID}" MATCHES "^(Apple)+Clang$")
if(OpenMP_C_FOUND)
# OpenMP flags for macOS clang
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Xpreprocessor -fopenmp")
add_link_options("LINKER:-lomp")
if(FORCE_OPENMP)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Xpreprocessor -fopenmp")
add_link_options("LINKER:-lomp")
endif()
endif()
else()
Expand Down

0 comments on commit 5ab41b0

Please sign in to comment.