Skip to content

Commit

Permalink
#18: cmake: add openmp loading
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepebay committed Sep 30, 2023
1 parent f1627be commit 93c0575
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmake/load_openmp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if(NOT APPLE)
find_package(OpenMP)
if (OPENMP_FOUND)
message(STATUS "Found OpenMP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
set(openmp_enabled ON)
endif()
endif()

0 comments on commit 93c0575

Please sign in to comment.