mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 09:25:41 +01:00
Make sure that our thread api preferences are saved in the cache.
This commit is contained in:
parent
78ed5f5e92
commit
04cbf615f5
@ -34,15 +34,15 @@ INCLUDE_DIRECTORIES( ${TexC_BINARY_DIR}/IO/include )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/Core/include )
|
||||
|
||||
SET( THREAD_API "None" CACHE STRING "API used to implement threading operations")
|
||||
SET( THREAD_API )
|
||||
SET( THREAD_APIS_AVAILABLE "None" )
|
||||
|
||||
FIND_PACKAGE( Boost COMPONENTS thread system )
|
||||
IF( Boost_FOUND )
|
||||
|
||||
SET( THREAD_APIS_AVAILABLE ${THREAD_APIS_AVAILABLE} "Boost" )
|
||||
IF( THREAD_API MATCHES "None" )
|
||||
SET( THREAD_API "Boost" )
|
||||
SET( THREAD_APIS_AVAILABLE "Boost" ${THREAD_APIS_AVAILABLE} )
|
||||
IF( "${THREAD_API}" STREQUAL "" )
|
||||
SET( THREAD_API "Boost" )
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
@ -50,13 +50,19 @@ ENDIF()
|
||||
FIND_PACKAGE( Threads )
|
||||
IF( CMAKE_USE_PTHREADS_INIT )
|
||||
|
||||
SET( THREAD_APIS_AVAILABLE ${THREAD_APIS_AVAILABLE} "PThread" )
|
||||
IF( THREAD_API MATCHES "None" )
|
||||
SET( THREAD_API "Boost" )
|
||||
SET( THREAD_APIS_AVAILABLE "PThread" ${THREAD_APIS_AVAILABLE} )
|
||||
IF( "${THREAD_API}" STREQUAL "" )
|
||||
SET( THREAD_API "PThread" )
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
IF( "${THREAD_API}" STREQUAL "" )
|
||||
SET( THREAD_API "None" )
|
||||
ENDIF()
|
||||
|
||||
SET( THREAD_API_DESC "API used to implement threading operations")
|
||||
SET( THREAD_API ${THREAD_API} CACHE STRING ${THREAD_API_DESC} FORCE )
|
||||
SET_PROPERTY( CACHE THREAD_API PROPERTY STRINGS ${THREAD_APIS_AVAILABLE} )
|
||||
|
||||
IF( THREAD_API MATCHES "Boost")
|
||||
|
Loading…
Reference in New Issue
Block a user