From 18165bbe112364dee8a284288352c694b48745e7 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 16 Aug 2001 17:42:58 -0400 Subject: ENH: add CMAKE_USE_WIN32_THREADS to the possible thread types --- Templates/CMakeSystemConfig.cmake.in | 2 ++ Templates/CMakeWindowsSystemConfig.cmake | 1 + Templates/configure | 15 +++++++++------ Templates/configure.in | 4 +++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Templates/CMakeSystemConfig.cmake.in b/Templates/CMakeSystemConfig.cmake.in index aa9f174..bac362e 100644 --- a/Templates/CMakeSystemConfig.cmake.in +++ b/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 diff --git a/Templates/CMakeWindowsSystemConfig.cmake b/Templates/CMakeWindowsSystemConfig.cmake index 69199ed..895a8b5 100644 --- a/Templates/CMakeWindowsSystemConfig.cmake +++ b/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") diff --git a/Templates/configure b/Templates/configure index ba44bfa..62fb332 100755 --- a/Templates/configure +++ b/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 < @@ -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 < @@ -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 <&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 diff --git a/Templates/configure.in b/Templates/configure.in index 3c1538d..b2e6910 100644 --- a/Templates/configure.in +++ b/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) -- cgit v0.12