Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1733 from scribam/cmake-openmp
Browse files Browse the repository at this point in the history
cmake: Rework OpenMP integration
  • Loading branch information
skmp committed Aug 17, 2019
2 parents d6db5a5 + 88084ea commit 85c1515
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ if(${HOST_OS} EQUAL ${OS_LINUX})
message(FATAL_ERROR "EGL or GLX required")
endif()

find_package(OpenMP)
if(OpenMP_FOUND)
target_link_libraries(${TNAME} OpenMP::OpenMP_CXX)
else()
target_compile_definitions(${TNAME} PUBLIC TARGET_NO_OPENMP)
endif()

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(AO ao)
Expand Down
4 changes: 0 additions & 4 deletions reicast/cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ elseif ((${BUILD_COMPILER} EQUAL ${COMPILER_GCC}) OR

if((${HOST_CPU} EQUAL ${CPU_X86}) OR (${HOST_CPU} EQUAL ${CPU_X64}))
set(_C_FLAGS "${_C_FLAGS} -msse4")

if(NOT CMAKE_HOST_APPLE)
set(_C_FLAGS "${_C_FLAGS} -fopenmp")
endif()
endif() # X86 family


Expand Down

0 comments on commit 85c1515

Please sign in to comment.