1.1 --- a/CMakeLists.txt Sun Jan 29 11:28:41 2012 +0100
1.2 +++ b/CMakeLists.txt Sun Jan 29 22:33:14 2012 +0100
1.3 @@ -115,8 +115,26 @@
1.4 SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
1.5
1.6 INCLUDE(FindThreads)
1.7 -SET(LEMON_USE_PTHREAD ${CMAKE_USE_PTHREADS_INIT})
1.8 -SET(LEMON_USE_WIN32_THREADS ${CMAKE_USE_WIN32_THREADS_INIT})
1.9 +
1.10 +IF(NOT LEMON_THREADING)
1.11 + IF(CMAKE_USE_PTHREADS_INIT)
1.12 + SET(LEMON_THREADING "Pthread")
1.13 + ELSEIF(CMAKE_USE_WIN32_THREADS_INIT)
1.14 + SET(LEMON_THREADING "Win32")
1.15 + ELSE()
1.16 + SET(LEMON_THREADING "None")
1.17 + ENDIF()
1.18 +ENDIF()
1.19 +
1.20 +SET( LEMON_THREADING "${LEMON_THREADING}" CACHE STRING
1.21 + "Choose the threading library, options are: Pthread Win32 None."
1.22 + FORCE )
1.23 +
1.24 +IF(LEMON_THREADING STREQUAL "Pthread")
1.25 + SET(LEMON_USE_PTHREAD TRUE)
1.26 +ELSEIF(LEMON_THREADING STREQUAL "Win32")
1.27 + SET(LEMON_USE_WIN32_THREADS TRUE)
1.28 +ENDIF()
1.29
1.30 ENABLE_TESTING()
1.31