diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-08-08 15:54:46 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-08-08 15:54:46 (GMT) |
commit | db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe (patch) | |
tree | ad569e72f02849e50e625faa1350bb05a3af08f9 /Templates | |
parent | 61ec323b6a1c4e5a44331014447e3d1d31dc1b6b (diff) | |
download | CMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.zip CMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.tar.gz CMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.tar.bz2 |
ENH: big change, only allow commands access to the cache via the cmMakefile class and GetDefinition, also the cmMakefile is the only way for commands to add to the cache. Also, some changes to configure.in that check for for scoping
Diffstat (limited to 'Templates')
-rw-r--r-- | Templates/CMakeSystemConfig.cmake.in | 1 | ||||
-rwxr-xr-x | Templates/configure | 23 | ||||
-rw-r--r-- | Templates/configure.in | 17 |
3 files changed, 39 insertions, 2 deletions
diff --git a/Templates/CMakeSystemConfig.cmake.in b/Templates/CMakeSystemConfig.cmake.in index 1a5ac24..aa9f174 100644 --- a/Templates/CMakeSystemConfig.cmake.in +++ b/Templates/CMakeSystemConfig.cmake.in @@ -50,4 +50,5 @@ SET (CMAKE_X_CFLAGS "@X_CFLAGS@" CACHE STRING "X11 extra flags") SET (CMAKE_HAS_X @CMAKE_HAS_X@ CACHE INTERNAL "Is X11 around") SET (CMAKE_NO_ANSI_STREAM_HEADERS @CMAKE_NO_ANSI_STREAM_HEADERS@ CACHE INTERNAL "does the compiler support headers like iostream ") SET (CMAKE_NO_STD_NAMESPACE @CMAKE_NO_STD_NAMESPACE@ CACHE INTERNAL "does the compiler support std:: ") +SET (CMAKE_NO_ANSI_FOR_SCOPE @CMAKE_NO_ANSI_FOR_SCOPE@ CACHE INTERNAL "does the compiler support ansi for scoping.") SET (CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@ CACHE INTERNAL "Is the compile GNU C++") diff --git a/Templates/configure b/Templates/configure index 1dc4fa0..1ac80b6 100755 --- a/Templates/configure +++ b/Templates/configure @@ -2961,6 +2961,24 @@ 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:2968: checking ansi for scope support " >&5 + rm -rf conftest.* + cat > conftest.cc <<! +void foo() { for(int i;;); for(int i;;); } +! + if test -z "`${CXX} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then + echo "$ac_t""yes" 1>&6 + else + CMAKE_NO_ANSI_FOR_SCOPE="1" + echo "$ac_t""no" 1>&6 + fi +fi + + + if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then SHLIB_CFLAGS="-fPIC" fi @@ -2971,7 +2989,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:2975: checking for $ac_word" >&5 +echo "configure:2993: 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 @@ -3011,7 +3029,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:3015: checking for $ac_word" >&5 +echo "configure:3033: 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 @@ -3249,6 +3267,7 @@ s%@CMAKE_ANSI_CFLAGS@%$CMAKE_ANSI_CFLAGS%g s%@CMAKE_TEMPLATE_FLAGS@%$CMAKE_TEMPLATE_FLAGS%g s%@CMAKE_NO_STD_NAMESPACE@%$CMAKE_NO_STD_NAMESPACE%g s%@CMAKE_NO_ANSI_STREAM_HEADERS@%$CMAKE_NO_ANSI_STREAM_HEADERS%g +s%@CMAKE_NO_ANSI_FOR_SCOPE@%$CMAKE_NO_ANSI_FOR_SCOPE%g s%@RUNMAKE@%$RUNMAKE%g s%@CMAKE_AR_TMP@%$CMAKE_AR_TMP%g s%@CMAKE_AR@%$CMAKE_AR%g diff --git a/Templates/configure.in b/Templates/configure.in index ab6bd3e..d738f47 100644 --- a/Templates/configure.in +++ b/Templates/configure.in @@ -536,6 +536,23 @@ fi AC_SUBST(CMAKE_NO_ANSI_STREAM_HEADERS) +# check to see if for scoping is supported +if test $ac_cv_prog_gxx = no; then + AC_MSG_CHECKING( ansi for scope support ) + rm -rf conftest.* + cat > conftest.cc <<! +void foo() { for(int i;;); for(int i;;); } +! + if test -z "`${CXX} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then + echo "$ac_t""yes" 1>&6 + else + CMAKE_NO_ANSI_FOR_SCOPE="1" + echo "$ac_t""no" 1>&6 + fi +fi +AC_SUBST(CMAKE_NO_ANSI_FOR_SCOPE) + + if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then SHLIB_CFLAGS="-fPIC" fi |