diff options
author | Brad King <brad.king@kitware.com> | 2003-05-12 17:43:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-05-12 17:43:03 (GMT) |
commit | 3651096aadd2993432f7388cd8c5aaf740f785a6 (patch) | |
tree | 029b658bc7ecbe683d20a11cba8d30f6a785fc65 | |
parent | a63e6b5af3f188232a40a09a75fff43e7b8b8a13 (diff) | |
download | CMake-3651096aadd2993432f7388cd8c5aaf740f785a6.zip CMake-3651096aadd2993432f7388cd8c5aaf740f785a6.tar.gz CMake-3651096aadd2993432f7388cd8c5aaf740f785a6.tar.bz2 |
ENH: Added KWSYS_FORCE_OLD_STREAMS option to force use of non-ansi stream headers even if they are available.
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Source/kwsys/Configure.hxx.in | 4 | ||||
-rw-r--r-- | Source/kwsys/kwsys_std_fstream.h.in | 4 | ||||
-rw-r--r-- | Source/kwsys/kwsys_std_iosfwd.h.in | 2 | ||||
-rw-r--r-- | Source/kwsys/kwsys_std_iostream.h.in | 4 | ||||
-rw-r--r-- | Source/kwsys/kwsys_std_sstream.h.in | 4 |
6 files changed, 13 insertions, 10 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 4d0fb0e..8b5befc 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -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}) diff --git a/Source/kwsys/Configure.hxx.in b/Source/kwsys/Configure.hxx.in index 1c548ba..367f887 100644 --- a/Source/kwsys/Configure.hxx.in +++ b/Source/kwsys/Configure.hxx.in @@ -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 diff --git a/Source/kwsys/kwsys_std_fstream.h.in b/Source/kwsys/kwsys_std_fstream.h.in index 057247b..127bfab 100644 --- a/Source/kwsys/kwsys_std_fstream.h.in +++ b/Source/kwsys/kwsys_std_fstream.h.in @@ -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 diff --git a/Source/kwsys/kwsys_std_iosfwd.h.in b/Source/kwsys/kwsys_std_iosfwd.h.in index 375f01f..8f86677 100644 --- a/Source/kwsys/kwsys_std_iosfwd.h.in +++ b/Source/kwsys/kwsys_std_iosfwd.h.in @@ -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; diff --git a/Source/kwsys/kwsys_std_iostream.h.in b/Source/kwsys/kwsys_std_iostream.h.in index 57b3e7f..686416b 100644 --- a/Source/kwsys/kwsys_std_iostream.h.in +++ b/Source/kwsys/kwsys_std_iostream.h.in @@ -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 diff --git a/Source/kwsys/kwsys_std_sstream.h.in b/Source/kwsys/kwsys_std_sstream.h.in index 3bd32af..1d30593 100644 --- a/Source/kwsys/kwsys_std_sstream.h.in +++ b/Source/kwsys/kwsys_std_sstream.h.in @@ -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 |