Browse Source

ENH: add CMAKE_USE_WIN32_THREADS to the possible thread types

Bill Hoffman 24 years ago
parent
commit
18165bbe11

+ 2 - 0
Templates/CMakeSystemConfig.cmake.in

@@ -8,6 +8,8 @@ SET (CMAKE_WORDS_BIGENDIAN    @CMAKE_WORDS_BIGENDIAN@ )
 SET (CMAKE_USE_SPROC          @CMAKE_USE_SPROC@ CACHE BOOL "Use sproc libs.")
 SET (CMAKE_USE_PTHREADS       @CMAKE_USE_PTHREADS@ CACHE BOOL
         "Use the pthreads library")
+SET (CMAKE_USE_WIN32_THREADS       @CMAKE_USE_WIN32_THREADS@ CACHE BOOL
+        "Use the win32 thread library")
 SET (CMAKE_HP_PTHREADS        @CMAKE_HP_PTHREADS@ CACHE BOOL
         "Use HP pthreads")
 SET (CMAKE_LIB_EXT            @CMAKE_LIB_EXT@ CACHE STRING

+ 1 - 0
Templates/CMakeWindowsSystemConfig.cmake

@@ -14,3 +14,4 @@ SET (CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Od /GZ" CACHE STRING
         "Flags used by the compiler during debug builds")
 SET (CMAKE_CXX_FLAGS "/W3 /Zm1000 /GX /GR" CACHE STRING
         "Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib")
+SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL "Use the win32 thread library")

+ 9 - 6
Templates/configure

@@ -2878,7 +2878,8 @@ case $system in
 	;;   
     CYGWIN_NT*)
         CMAKE_THREAD_LIBS=""
-	CMAKE_USE_PTHREADS=1
+	CMAKE_USE_WIN32_THREADS=1
+        CMAKE_USE_PTHREADS=0
         ;;
 esac
 fi
@@ -2889,6 +2890,7 @@ fi
 
 
 
+
 CMAKE_ANSI_CFLAGS=""
 # on hp use -Aa for ansi
 if test $ac_cv_prog_gxx = no; then
@@ -2928,7 +2930,7 @@ fi
 # ansi stream files (without the .h)
 if test $ac_cv_prog_gxx = no; then
   echo $ac_n "checking ansi standard C++ stream headers ""... $ac_c" 1>&6
-echo "configure:2932: checking ansi standard C++ stream headers " >&5 
+echo "configure:2934: checking ansi standard C++ stream headers " >&5 
   rm -rf conftest.*
   cat > conftest.cc <<!
 #include <iostream>
@@ -2945,7 +2947,7 @@ fi
 # check to see if stl is in the std namespace
 if test $ac_cv_prog_gxx = no; then
   echo $ac_n "checking ansi standard namespace support ""... $ac_c" 1>&6
-echo "configure:2949: checking ansi standard namespace support " >&5 
+echo "configure:2951: checking ansi standard namespace support " >&5 
   rm -rf conftest.*
   cat > conftest.cc <<!
 #include <list>
@@ -2964,7 +2966,7 @@ fi
 # check to see if for scoping is supported
 if test $ac_cv_prog_gxx = no; then
   echo $ac_n "checking ansi for scope support ""... $ac_c" 1>&6
-echo "configure:2968: checking ansi for scope support " >&5 
+echo "configure:2970: checking ansi for scope support " >&5 
   rm -rf conftest.*
   cat > conftest.cc <<!
 void foo() { for(int i;;); for(int i;;); }
@@ -2989,7 +2991,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2993: checking for $ac_word" >&5
+echo "configure:2995: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_RUNMAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3029,7 +3031,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3033: checking for $ac_word" >&5
+echo "configure:3035: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CMAKE_AR_TMP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3261,6 +3263,7 @@ s%@CMAKE_SHLIB_RUNTIME_FLAG@%$CMAKE_SHLIB_RUNTIME_FLAG%g
 s%@CMAKE_SHLIB_RUNTIME_SEP@%$CMAKE_SHLIB_RUNTIME_SEP%g
 s%@CMAKE_USE_SPROC@%$CMAKE_USE_SPROC%g
 s%@CMAKE_USE_PTHREADS@%$CMAKE_USE_PTHREADS%g
+s%@CMAKE_USE_WIN32_THREADS@%$CMAKE_USE_WIN32_THREADS%g
 s%@CMAKE_HP_PTHREADS@%$CMAKE_HP_PTHREADS%g
 s%@CMAKE_THREAD_LIBS@%$CMAKE_THREAD_LIBS%g
 s%@CMAKE_ANSI_CFLAGS@%$CMAKE_ANSI_CFLAGS%g

+ 3 - 1
Templates/configure.in

@@ -455,13 +455,15 @@ case $system in
 	;;   
     CYGWIN_NT*)
         CMAKE_THREAD_LIBS=""
-	CMAKE_USE_PTHREADS=1
+	CMAKE_USE_WIN32_THREADS=0
+        CMAKE_USE_PTHREADS=1
         ;;
 esac
 fi
 
 AC_SUBST(CMAKE_USE_SPROC)
 AC_SUBST(CMAKE_USE_PTHREADS)
+AC_SUBST(CMAKE_USE_WIN32_THREADS)
 AC_SUBST(CMAKE_HP_PTHREADS)
 AC_SUBST(CMAKE_THREAD_LIBS)