summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindThreads.cmake38
1 files changed, 20 insertions, 18 deletions
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index 5354b4d..623b4c4 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -44,25 +44,27 @@ IF(CMAKE_SYSTEM MATCHES "Windows")
SET(CMAKE_USE_WIN32_THREADS 1)
ENDIF(CMAKE_SYSTEM MATCHES "Windows")
-IF(CMAKE_SYSTEM MATCHES "HP-UX-*")
- SET(CMAKE_THREAD_LIBS "-lcma")
- SET(CMAKE_USE_PTHREADS 1)
- SET(CMAKE_HP_PTHREADS 1)
-ENDIF(CMAKE_SYSTEM MATCHES "HP-UX-*")
+IF(CMAKE_USE_PTHREADS)
+ IF(CMAKE_SYSTEM MATCHES "HP-UX-*")
+ SET(CMAKE_THREAD_LIBS "-lcma")
+ SET(CMAKE_USE_PTHREADS 1)
+ SET(CMAKE_HP_PTHREADS 1)
+ ENDIF(CMAKE_SYSTEM MATCHES "HP-UX-*")
-IF(CMAKE_SYSTEM MATCHES "OSF1-V*")
- SET(CMAKE_USE_PTHREADS 0)
- SET(CMAKE_THREAD_LIBS )
-ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V*")
+ IF(CMAKE_SYSTEM MATCHES "OSF1-V*")
+ SET(CMAKE_USE_PTHREADS 0)
+ SET(CMAKE_THREAD_LIBS )
+ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V*")
-IF(CMAKE_SYSTEM MATCHES "FreeBSD*")
- SET(CMAKE_USE_PTHREADS 0)
- SET(CMAKE_THREAD_LIBS )
-ENDIF(CMAKE_SYSTEM MATCHES "FreeBSD*")
+ IF(CMAKE_SYSTEM MATCHES "FreeBSD*")
+ SET(CMAKE_USE_PTHREADS 0)
+ SET(CMAKE_THREAD_LIBS )
+ ENDIF(CMAKE_SYSTEM MATCHES "FreeBSD*")
-IF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
- SET(CMAKE_USE_PTHREADS 1)
- SET(CMAKE_THREAD_LIBS )
- SET(CMAKE_USE_WIN32_THREADS 0)
-ENDIF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
+ IF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
+ SET(CMAKE_USE_PTHREADS 1)
+ SET(CMAKE_THREAD_LIBS )
+ SET(CMAKE_USE_WIN32_THREADS 0)
+ ENDIF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
+ENDIF(CMAKE_USE_PTHREADS)