summaryrefslogtreecommitdiffstats
path: root/Templates/configure.in
diff options
context:
space:
mode:
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"