summaryrefslogtreecommitdiffstats
path: root/Modules/FindThreads.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2010-06-12 00:10:38 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2010-06-12 00:10:38 (GMT)
commitd09664a4d4fc34d14579bcd00d301c299e58a96d (patch)
treed7b68e7f9327d59fec074e739c8754b5c0da6fcf /Modules/FindThreads.cmake
parentb9e3c243d476efa04479d253cfc4f76ecbdb6fe3 (diff)
downloadCMake-d09664a4d4fc34d14579bcd00d301c299e58a96d.zip
CMake-d09664a4d4fc34d14579bcd00d301c299e58a96d.tar.gz
CMake-d09664a4d4fc34d14579bcd00d301c299e58a96d.tar.bz2
Support pthreads on irix.
Diffstat (limited to 'Modules/FindThreads.cmake')
-rw-r--r--Modules/FindThreads.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index 459129b..2a74304 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -5,6 +5,8 @@
# CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads?
# CMAKE_USE_PTHREADS_INIT - are we using pthreads
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
+# For systems with multiple thread libraries, caller can set
+# CMAKE_THREAD_PREFER_PTHREADS
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
@@ -24,11 +26,11 @@ INCLUDE (CheckLibraryExists)
SET(Threads_FOUND FALSE)
# Do we have sproc?
-IF(CMAKE_SYSTEM MATCHES IRIX)
+IF(CMAKE_SYSTEM MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD)
CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H)
ENDIF()
-IF(CMAKE_HAVE_SPROC_H)
+IF(CMAKE_HAVE_SPROC_H AND NOT CMAKE_THREAD_PREFER_PTHREAD)
# We have sproc
SET(CMAKE_USE_SPROC_INIT 1)
ELSE()