MinGW: Better pthread names order
This commit is contained in:
parent
89d5cee4c1
commit
26054a1c60
@ -278,7 +278,7 @@ else()
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(PTHREAD_NAMES pthreadVC2)
|
set(PTHREAD_NAMES pthreadVC2)
|
||||||
elseif(MINGW)
|
elseif(MINGW)
|
||||||
set(PTHREAD_NAMES "winpthread-1" "pthreadGC2" "libwinpthread-1")
|
set(PTHREAD_NAMES "winpthread-1" "libwinpthread-1" "pthreadGC2")
|
||||||
endif()
|
endif()
|
||||||
find_library(PTHREAD_LIBRARY NAMES pthread ${PTHREAD_NAMES} PATHS ${PROJECT_SOURCE_DIR}/dependencies/lib)
|
find_library(PTHREAD_LIBRARY NAMES pthread ${PTHREAD_NAMES} PATHS ${PROJECT_SOURCE_DIR}/dependencies/lib)
|
||||||
mark_as_advanced(PTHREAD_LIBRARY)
|
mark_as_advanced(PTHREAD_LIBRARY)
|
||||||
@ -392,7 +392,7 @@ if(MINGW)
|
|||||||
if(LIBOPENMP)
|
if(LIBOPENMP)
|
||||||
file(COPY ${LIBOPENMP} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
|
file(COPY ${LIBOPENMP} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
|
||||||
endif()
|
endif()
|
||||||
find_library(LIBPTHREAD NAMES "winpthread-1.dll" "pthreadGC2.dll" "libwinpthread-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
|
find_library(LIBPTHREAD NAMES "winpthread-1.dll" "libwinpthread-1.dll" "pthreadGC2.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
|
||||||
if(LIBPTHREAD)
|
if(LIBPTHREAD)
|
||||||
file(COPY ${LIBPTHREAD} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
|
file(COPY ${LIBPTHREAD} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user