Revert "CMakeLists.txt: Don't link against OpenMP when using static linking"

This reverts commit 1469d92b

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404 2022-11-01 10:18:32 +01:00
parent 4abd0408b7
commit 8341096773
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 4 additions and 6 deletions

View File

@ -64,12 +64,10 @@ find_package(Threads)
if (${IS_GNU} OR ${IS_CLANG})
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
if (Threads_FOUND AND NOT MINGW)
if (NOT ("${CMAKE_EXE_LINKER_FLAGS}" MATCHES -static))
include(FindOpenMP)
if (OpenMP_CXX_FOUND)
set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
add_definitions(-D_GLIBCXX_PARALLEL)
endif()
include(FindOpenMP)
if (OpenMP_CXX_FOUND)
set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
add_definitions(-D_GLIBCXX_PARALLEL)
endif()
endif()
if (NOT DEFINED EMSCRIPTEN)