BUG: Added more try-compiles from kwsys.

This commit is contained in:
Brad King 2005-04-13 14:13:35 -04:00
parent 772b121a14
commit b370936a25
1 changed files with 45 additions and 1 deletions

View File

@ -203,6 +203,10 @@ cmake_kwsys_config_replace_string ()
s/@KWSYS_STL_STRING_HAVE_ISTREAM@/${KWSYS_STL_STRING_HAVE_ISTREAM}/g;
s/@KWSYS_STL_STRING_HAVE_OSTREAM@/${KWSYS_STL_STRING_HAVE_OSTREAM}/g;
s/@KWSYS_STL_STRING_HAVE_NEQ_CHAR@/${KWSYS_STL_STRING_HAVE_NEQ_CHAR}/g;
s/@KWSYS_STL_HAS_ALLOCATOR_REBIND@/${KWSYS_STL_HAS_ALLOCATOR_REBIND}/g;
s/@KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS@/${KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS}/g;
s/@KWSYS_CXX_HAS_MEMBER_TEMPLATES@/${KWSYS_CXX_HAS_MEMBER_TEMPLATES}/g;
s/@KWSYS_CXX_HAS_FULL_SPECIALIZATION@/${KWSYS_CXX_HAS_FULL_SPECIALIZATION}/g;
s/@KWSYS_STAT_HAS_ST_MTIM@/${KWSYS_STAT_HAS_ST_MTIM}/g;}" >> "${OUTFILE}.tmp"
if [ -f "${OUTFILE}.tmp" ]; then
if diff "${OUTFILE}" "${OUTFILE}.tmp" > /dev/null 2> /dev/null ; then
@ -257,7 +261,7 @@ cmake_try_run ()
echo "Try: ${COMPILER}"
echo "Line: ${COMPILER} ${FLAGS} ${TESTFILE} -o ${TMPFILE}"
echo "---------- file -----------------------"
cat ${TESTFILE}
cat "${TESTFILE}"
echo "------------------------------------------"
"${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}"
RES=$?
@ -711,6 +715,10 @@ KWSYS_IOS_USE_ANSI=0
KWSYS_STL_HAVE_STD=0
KWSYS_STAT_HAS_ST_MTIM=0
KWSYS_STL_STRING_HAVE_NEQ_CHAR=0
KWSYS_STL_HAS_ALLOCATOR_REBIND=0
KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS=0
KWSYS_CXX_HAS_MEMBER_TEMPLATES=0
KWSYS_CXX_HAS_FULL_SPECIALIZATION=0
# Hardcode these kwsys features. They work on all known UNIX compilers anyway.
KWSYS_STL_STRING_HAVE_ISTREAM=1
@ -783,6 +791,42 @@ else
echo "${cmake_cxx_compiler} does not have operator!=(string, char*)"
fi
if cmake_try_run "${cmake_cxx_compiler}" \
"${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ALLOCATOR_REBIND -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
"${cmake_source_dir}/Source/kwsys/kwsysPlatformCxxTests.cxx" >> cmake_bootstrap.log 2>&1; then
KWSYS_STL_HAS_ALLOCATOR_REBIND=1
echo "${cmake_cxx_compiler} has allocator<>::rebind<>"
else
echo "${cmake_cxx_compiler} does not have allocator<>::rebind<>"
fi
if cmake_try_run "${cmake_cxx_compiler}" \
"${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS" \
"${cmake_source_dir}/Source/kwsys/kwsysPlatformCxxTests.cxx" >> cmake_bootstrap.log 2>&1; then
echo "${cmake_cxx_compiler} does not require template friends to use <>"
else
KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS=1
echo "${cmake_cxx_compiler} requires template friends to use <>"
fi
if cmake_try_run "${cmake_cxx_compiler}" \
"${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_MEMBER_TEMPLATES" \
"${cmake_source_dir}/Source/kwsys/kwsysPlatformCxxTests.cxx" >> cmake_bootstrap.log 2>&1; then
KWSYS_CXX_HAS_MEMBER_TEMPLATES=1
echo "${cmake_cxx_compiler} supports member templates"
else
echo "${cmake_cxx_compiler} does not support member templates"
fi
if cmake_try_run "${cmake_cxx_compiler}" \
"${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_FULL_SPECIALIZATION" \
"${cmake_source_dir}/Source/kwsys/kwsysPlatformCxxTests.cxx" >> cmake_bootstrap.log 2>&1; then
KWSYS_CXX_HAS_FULL_SPECIALIZATION=1
echo "${cmake_cxx_compiler} has standard template specialization syntax"
else
echo "${cmake_cxx_compiler} does not have standard template specialization syntax"
fi
if cmake_try_run "${cmake_cxx_compiler}" \
"${cmake_cxx_flags} -DTEST_KWSYS_STAT_HAS_ST_MTIM" \
"${cmake_source_dir}/Source/kwsys/kwsysPlatformCxxTests.cxx" >> cmake_bootstrap.log 2>&1; then