summaryrefslogtreecommitdiffstats
path: root/Templates/configure.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-03-12 15:16:00 (GMT)
committerBrad King <brad.king@kitware.com>2002-03-12 15:16:00 (GMT)
commit83a0759e479ee0718296a1bb8f6fb26e1b13500a (patch)
tree4a1a7e21ca22264a135b61ba15f63288844d461d /Templates/configure.in
parent433e1128ab14897932b8c6eeae17f2fc861e7636 (diff)
downloadCMake-83a0759e479ee0718296a1bb8f6fb26e1b13500a.zip
CMake-83a0759e479ee0718296a1bb8f6fb26e1b13500a.tar.gz
CMake-83a0759e479ee0718296a1bb8f6fb26e1b13500a.tar.bz2
ENH: Added test for explicit instantiation support.
Diffstat (limited to 'Templates/configure.in')
-rw-r--r--Templates/configure.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/Templates/configure.in b/Templates/configure.in
index 3a62545..a1eb7a5 100644
--- a/Templates/configure.in
+++ b/Templates/configure.in
@@ -477,7 +477,20 @@ case $system in
;;
esac
-# if running on darwin no explicit template instantiations
+CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION=""
+if test $ac_cv_prog_gxx = no; then
+ echo $ac_n "checking whether ${CXX} supports explicit instantiation""... $ac_c" 1>&6
+ echo 'template<class T>class x{};template class x<int>;' > conftest.cc
+ if test -z "`${CXX} -c conftest.cc 2>&1`"; then
+ echo "$ac_t""yes" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1"
+ fi
+ rm -f conftest*
+fi
+# if running on darwin no explicit template instantiations even though
+# syntax is supported.
case $system in
Darwin*)
CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1"