ENH: Added KWSYS_FORCE_OLD_STREAMS option to force use of non-ansi stream headers even if they are available.

This commit is contained in:
Brad King 2003-05-12 13:43:03 -04:00
parent a63e6b5af3
commit 3651096aad
6 changed files with 13 additions and 10 deletions

View File

@ -14,6 +14,11 @@ IF(NOT CMAKE_HAS_ANSI_STRING_STREAM)
SET(CMAKE_NO_ANSI_STRING_STREAM 1)
ENDIF(NOT CMAKE_HAS_ANSI_STRING_STREAM)
IF(KWSYS_FORCE_OLD_STREAMS)
SET(CMAKE_NO_ANSI_STREAM_HEADERS 1)
SET(CMAKE_NO_ANSI_STRING_STREAM 1)
ENDIF(KWSYS_FORCE_OLD_STREAMS)
SET(KWSYS_NO_STD_NAMESPACE ${CMAKE_NO_STD_NAMESPACE})
SET(KWSYS_NO_ANSI_STREAM_HEADERS ${CMAKE_NO_ANSI_STREAM_HEADERS})
SET(KWSYS_NO_ANSI_STRING_STREAM ${CMAKE_NO_ANSI_STRING_STREAM})

View File

@ -23,6 +23,10 @@
#cmakedefine KWSYS_NO_ANSI_STRING_STREAM
#cmakedefine KWSYS_NO_ANSI_FOR_SCOPE
#if defined(__GNUC__) && (__GNUC__ < 3)
# define KWSYS_FAKE_STD_NAMESPACE
#endif
#if defined(KWSYS_NO_STD_NAMESPACE)
# define kwsys_std
#else

View File

@ -28,8 +28,7 @@
# include <fstream>
#else
# include <fstream.h>
# if !defined(KWSYS_NO_STD_NAMESPACE)
# if !defined(KWSYS_NO_STD_NAMESPACE) && !defined(KWSYS_FAKE_STD_NAMESPACE)
namespace std
{
using ::ostream;
@ -40,7 +39,6 @@ namespace std
using ::endl;
using ::flush;
}
# endif
#endif

View File

@ -33,7 +33,7 @@ class ios;
class istream;
class ofstream;
class ostream;
# if !defined(KWSYS_NO_STD_NAMESPACE)
# if !defined(KWSYS_NO_STD_NAMESPACE) && !defined(KWSYS_FAKE_STD_NAMESPACE)
namespace std
{
using ::fstream;

View File

@ -28,8 +28,7 @@
# include <iostream>
#else
# include <iostream.h>
# if !defined(KWSYS_NO_STD_NAMESPACE)
# if !defined(KWSYS_NO_STD_NAMESPACE) && !defined(KWSYS_FAKE_STD_NAMESPACE)
namespace std
{
using ::ostream;
@ -41,7 +40,6 @@ namespace std
using ::endl;
using ::flush;
}
# endif
#endif

View File

@ -37,8 +37,7 @@
# include <strstream>
# else
# include <strstream.h>
# if !defined(KWSYS_NO_STD_NAMESPACE)
# if !defined(KWSYS_NO_STD_NAMESPACE) && !defined(KWSYS_FAKE_STD_NAMESPACE)
namespace std
{
using ::ostream;
@ -50,7 +49,6 @@ namespace std
using ::ends;
using ::flush;
}
# endif
# endif
# ifdef _MSC_VER