added CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION

This commit is contained in:
Berk Geveci 2001-10-26 17:06:46 -04:00
parent 1c5c899fd7
commit d9b7df43ce
3 changed files with 42 additions and 23 deletions

View File

@ -62,3 +62,5 @@ SET (CMAKE_NO_ANSI_FOR_SCOPE @CMAKE_NO_ANSI_FOR_SCOPE@ CACHE INTERNAL "do
SET (CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@ CACHE INTERNAL "Is the compile GNU C++")
SET (CMAKE_ANSI_CFLAGS @CMAKE_ANSI_CFLAGS@ CACHE INTERNAL "What flags are required by the c++ compiler to make it ansi.")
SET (CMAKE_ANSI_CXXFLAGS @CMAKE_ANSI_CXXFLAGS@ CACHE INTERNAL "What flags are required by the c++ compiler to make it ansi.")
SET (CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION @CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION@ CACHE INTERNAL "does the compiler not support explicit template instantiation.")

55
Templates/configure vendored
View File

@ -2615,6 +2615,14 @@ case $system in
;;
esac
# if running on darwin no explicit template instantiations
case $system in
Darwin*)
CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1"
;;
esac
# If the user has supplied C flags for compiling shared objects, use
# those instead
if test "${SHLIB_CFLAGS}" != ""; then
@ -2671,17 +2679,17 @@ for ac_hdr in sys/prctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2675: checking for $ac_hdr" >&5
echo "configure:2683: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2680 "configure"
#line 2688 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2726,17 +2734,17 @@ for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2730: checking for $ac_hdr" >&5
echo "configure:2738: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2735 "configure"
#line 2743 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2765,7 +2773,7 @@ done
if test "$use_pthreads" = "yes"; then
if test "$use_sproc" = "no"; then
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:2769: checking for pthread_create in -lpthreads" >&5
echo "configure:2777: checking for pthread_create in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2773,7 +2781,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2777 "configure"
#line 2785 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2784,7 +2792,7 @@ int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:2788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2805,7 +2813,7 @@ else
fi
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:2809: checking for pthread_create in -lpthread" >&5
echo "configure:2817: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2813,7 +2821,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2817 "configure"
#line 2825 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2824,7 +2832,7 @@ int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:2828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2847,7 +2855,7 @@ fi
# Work around Solaris 5.6 and 5.7 bug:
if test "`uname -s -r`" = "SunOS 5.6"; then
echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
echo "configure:2851: checking for thr_create in -lthread" >&5
echo "configure:2859: checking for thr_create in -lthread" >&5
ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2855,7 +2863,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2859 "configure"
#line 2867 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2866,7 +2874,7 @@ int main() {
thr_create()
; return 0; }
EOF
if { (eval echo configure:2870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2889,7 +2897,7 @@ fi
fi
if test "`uname -s -r`" = "SunOS 5.7"; then
echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
echo "configure:2893: checking for thr_create in -lthread" >&5
echo "configure:2901: checking for thr_create in -lthread" >&5
ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2897,7 +2905,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2901 "configure"
#line 2909 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2908,7 +2916,7 @@ int main() {
thr_create()
; return 0; }
EOF
if { (eval echo configure:2912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3018,7 +3026,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:3022: checking ansi standard C++ stream headers " >&5
echo "configure:3030: checking ansi standard C++ stream headers " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <iostream>
@ -3035,7 +3043,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:3039: checking ansi standard namespace support " >&5
echo "configure:3047: checking ansi standard namespace support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <list>
@ -3053,7 +3061,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:3057: checking ansi for scope support " >&5
echo "configure:3065: checking ansi for scope support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
void foo() { for(int i;;); for(int i;;); }
@ -3078,7 +3086,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:3082: checking for $ac_word" >&5
echo "configure:3090: 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
@ -3118,7 +3126,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:3122: checking for $ac_word" >&5
echo "configure:3130: 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
@ -3339,6 +3347,7 @@ s%@CMAKE_WORDS_BIGENDIAN@%$CMAKE_WORDS_BIGENDIAN%g
s%@CMAKE_HAVE_LIMITS_H@%$CMAKE_HAVE_LIMITS_H%g
s%@CMAKE_HAVE_UNISTD_H@%$CMAKE_HAVE_UNISTD_H%g
s%@fullSrcDir@%$fullSrcDir%g
s%@CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION@%$CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION%g
s%@CMAKE_SHLIB_LINK_FLAGS@%$CMAKE_SHLIB_LINK_FLAGS%g
s%@CMAKE_SHLIB_BUILD_FLAGS@%$CMAKE_SHLIB_BUILD_FLAGS%g
s%@CMAKE_MODULE_LINK_FLAGS@%$CMAKE_MODULE_LINK_FLAGS%g

View File

@ -429,6 +429,14 @@ case $system in
;;
esac
# if running on darwin no explicit template instantiations
case $system in
Darwin*)
CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1"
;;
esac
AC_SUBST(CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION)
# If the user has supplied C flags for compiling shared objects, use
# those instead
if test "${SHLIB_CFLAGS}" != ""; then