浏览代码

ENH: use ANSI_CXXFLAGS for testing compiler

Bill Hoffman 24 年之前
父节点
当前提交
6e2834a877
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 3 3
      Templates/configure
  2. 3 3
      Templates/configure.in

+ 3 - 3
Templates/configure

@@ -4532,7 +4532,7 @@ echo $ECHO_N "checking ansi standard C++ stream headers ... $ECHO_C" >&6
   cat > conftest.cc <<!
   cat > conftest.cc <<!
 #include <iostream>
 #include <iostream>
 !
 !
-  if test -z "`${CXX} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
+  if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
     echo "$ac_t""yes" 1>&6
     echo "$ac_t""yes" 1>&6
   else
   else
     CMAKE_NO_ANSI_STREAM_HEADERS="1"
     CMAKE_NO_ANSI_STREAM_HEADERS="1"
@@ -4549,7 +4549,7 @@ echo $ECHO_N "checking ansi standard namespace support ... $ECHO_C" >&6
 #include <list>
 #include <list>
 void foo() { std::list<int> l; }
 void foo() { std::list<int> l; }
 !
 !
-  if test -z "`${CXX} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
+  if test -z "`${CXX}  ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
     echo "$ac_t""yes" 1>&6
     echo "$ac_t""yes" 1>&6
   else
   else
     CMAKE_NO_STD_NAMESPACE="1"
     CMAKE_NO_STD_NAMESPACE="1"
@@ -4565,7 +4565,7 @@ echo $ECHO_N "checking ansi for scope support ... $ECHO_C" >&6
   cat > conftest.cc <<!
   cat > conftest.cc <<!
 void foo() { for(int i;;); for(int i;;); }
 void foo() { for(int i;;); for(int i;;); }
 !
 !
-  if test -z "`${CXX} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
+  if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
     echo "$ac_t""yes" 1>&6
     echo "$ac_t""yes" 1>&6
   else
   else
     CMAKE_NO_ANSI_FOR_SCOPE="1"
     CMAKE_NO_ANSI_FOR_SCOPE="1"

+ 3 - 3
Templates/configure.in

@@ -525,7 +525,7 @@ if test $ac_cv_prog_gxx = no; then
   cat > conftest.cc <<!
   cat > conftest.cc <<!
 #include <iostream>
 #include <iostream>
 !
 !
-  if test -z "`${CXX} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
+  if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
     echo "$ac_t""yes" 1>&6
     echo "$ac_t""yes" 1>&6
   else
   else
     CMAKE_NO_ANSI_STREAM_HEADERS="1"
     CMAKE_NO_ANSI_STREAM_HEADERS="1"
@@ -542,7 +542,7 @@ if test $ac_cv_prog_gxx = no; then
 #include <list>
 #include <list>
 void foo() { std::list<int> l; }
 void foo() { std::list<int> l; }
 !
 !
-  if test -z "`${CXX} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
+  if test -z "`${CXX}  ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
     echo "$ac_t""yes" 1>&6
     echo "$ac_t""yes" 1>&6
   else
   else
     CMAKE_NO_STD_NAMESPACE="1"
     CMAKE_NO_STD_NAMESPACE="1"
@@ -558,7 +558,7 @@ if test $ac_cv_prog_gxx = no; then
   cat > conftest.cc <<!
   cat > conftest.cc <<!
 void foo() { for(int i;;); for(int i;;); }
 void foo() { for(int i;;); for(int i;;); }
 !
 !
-  if test -z "`${CXX} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
+  if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
     echo "$ac_t""yes" 1>&6
     echo "$ac_t""yes" 1>&6
   else
   else
     CMAKE_NO_ANSI_FOR_SCOPE="1"
     CMAKE_NO_ANSI_FOR_SCOPE="1"