diff options
author | Brad King <brad.king@kitware.com> | 2005-04-15 13:54:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-04-15 13:54:03 (GMT) |
commit | 6c68c8147532bbc07e467b6e80cbfbee07b99f26 (patch) | |
tree | 2748e864e7b3f90576e20153ee7eb53107938abe /bootstrap | |
parent | 4caefef37eb2f23948d915a6d33447ef4e6243c1 (diff) | |
download | CMake-6c68c8147532bbc07e467b6e80cbfbee07b99f26.zip CMake-6c68c8147532bbc07e467b6e80cbfbee07b99f26.tar.gz CMake-6c68c8147532bbc07e467b6e80cbfbee07b99f26.tar.bz2 |
ENH: Added KWSys try-compiles KWSYS_STL_HAS_ITERATOR_TRAITS, KWSYS_STL_HAS_ITERATOR_CATEGORY, KWSYS_STL_HAS___ITERATOR_CATEGORY, and KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE to get the hash table to compile on old HP and Sun compilers.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 65 |
1 files changed, 57 insertions, 8 deletions
@@ -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_ITERATOR_TRAITS@/${KWSYS_STL_HAS_ITERATOR_TRAITS}/g; + s/@KWSYS_STL_HAS_ITERATOR_CATEGORY@/${KWSYS_STL_HAS_ITERATOR_CATEGORY}/g; + s/@KWSYS_STL_HAS___ITERATOR_CATEGORY@/${KWSYS_STL_HAS___ITERATOR_CATEGORY}/g; + s/@KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE@/${KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE}/g; s/@KWSYS_STL_HAS_ALLOCATOR_REBIND@/${KWSYS_STL_HAS_ALLOCATOR_REBIND}/g; s/@KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT@/${KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT}/g; s/@KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS@/${KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS}/g; @@ -717,6 +721,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_ITERATOR_TRAITS=0 +KWSYS_STL_HAS_ITERATOR_CATEGORY=0 +KWSYS_STL_HAS___ITERATOR_CATEGORY=0 +KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE=0 KWSYS_STL_HAS_ALLOCATOR_REBIND=0 KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT=0 KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS=0 @@ -796,21 +804,62 @@ else 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_cxx_flags} -DTEST_KWSYS_STL_HAS_ITERATOR_TRAITS -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<>" + KWSYS_STL_HAS_ITERATOR_TRAITS=1 + echo "${cmake_cxx_compiler} has stl iterator_traits" else - echo "${cmake_cxx_compiler} does not have allocator<>::rebind<>" + echo "${cmake_cxx_compiler} does not have stl iterator_traits" +fi + +if [ "x${KWSYS_STL_HAS_ITERATOR_TRAITS}" = "x0" ]; then + if cmake_try_run "${cmake_cxx_compiler}" \ + "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ITERATOR_CATEGORY -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \ + "${cmake_source_dir}/Source/kwsys/kwsysPlatformCxxTests.cxx" >> cmake_bootstrap.log 2>&1; then + KWSYS_STL_HAS_ITERATOR_CATEGORY=1 + echo "${cmake_cxx_compiler} has old iterator_category" + else + echo "${cmake_cxx_compiler} does not have old iterator_category" + fi + if [ "x${KWSYS_STL_HAS_ITERATOR_CATEGORY}" = "x0" ]; then + if cmake_try_run "${cmake_cxx_compiler}" \ + "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS___ITERATOR_CATEGORY -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \ + "${cmake_source_dir}/Source/kwsys/kwsysPlatformCxxTests.cxx" >> cmake_bootstrap.log 2>&1; then + KWSYS_STL_HAS___ITERATOR_CATEGORY=1 + echo "${cmake_cxx_compiler} has old __iterator_category" + else + echo "${cmake_cxx_compiler} does not have old __iterator_category" + fi + fi fi if cmake_try_run "${cmake_cxx_compiler}" \ - "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \ + "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE -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_MAX_SIZE_ARGUMENT=1 - echo "${cmake_cxx_compiler} has non-standard allocator<>::max_size argument" + KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE=1 + echo "${cmake_cxx_compiler} has old non-template allocator" else - echo "${cmake_cxx_compiler} does not have non-standard allocator<>::max_size argument" + echo "${cmake_cxx_compiler} does not have old non-template allocator" +fi + +if [ "x${KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE}" = "x0" ]; then + 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_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT -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_MAX_SIZE_ARGUMENT=1 + echo "${cmake_cxx_compiler} has non-standard allocator<>::max_size argument" + else + echo "${cmake_cxx_compiler} does not have non-standard allocator<>::max_size argument" + fi fi if cmake_try_run "${cmake_cxx_compiler}" \ |