Commit 5c050762 authored by Brad King's avatar Brad King

ENH: Added full configuration of namespace even for Configure.hxx macro definitions.

parent e63db148
This diff is collapsed.
......@@ -17,20 +17,53 @@
#ifndef @KWSYS_NAMESPACE@_Configure_hxx
#define @KWSYS_NAMESPACE@_Configure_hxx
/* This configuration should match for all instances of kwsys. */
#cmakedefine KWSYS_NO_STD_NAMESPACE
#cmakedefine KWSYS_NO_ANSI_STREAM_HEADERS
#cmakedefine KWSYS_NO_ANSI_STRING_STREAM
#cmakedefine KWSYS_NO_ANSI_FOR_SCOPE
/* Defined if kwsys namespace is "kwsys". */
#if @KWSYS_NAME_IS_KWSYS@
# define @KWSYS_NAMESPACE@_NAME_IS_KWSYS
#endif
/* Defined if no ANSI C++ stream headers are present. */
#if @KWSYS_NO_ANSI_STREAM_HEADERS@
# define @KWSYS_NAMESPACE@_NO_ANSI_STREAM_HEADERS
#endif
/* Defined if no ANSI C++ <sstream> header is present. */
#if @KWSYS_NO_ANSI_STRING_STREAM@
# define @KWSYS_NAMESPACE@_NO_ANSI_STRING_STREAM
#endif
/* Defined if no std namespace is present. */
#if @KWSYS_NO_STD_NAMESPACE@
# define @KWSYS_NAMESPACE@_NO_STD_NAMESPACE
#endif
/* Defined if std namespace is the GCC hack. */
#if defined(__GNUC__) && (__GNUC__ < 3)
# define KWSYS_FAKE_STD_NAMESPACE
# define @KWSYS_NAMESPACE@_FAKE_STD_NAMESPACE
#endif
#if defined(KWSYS_NO_STD_NAMESPACE)
# define kwsys_std
/* Define the std namespace macro. */
#if defined(@KWSYS_NAMESPACE@_NO_STD_NAMESPACE)
# define @KWSYS_NAMESPACE@_std
#else
# define kwsys_std std
# define @KWSYS_NAMESPACE@_std std
#endif
/* If building a C++ file in kwsys itself, give the source file
access to the macros without a configured namespace. */
#if defined(KWSYS_NAMESPACE)
# if !defined(@KWSYS_NAMESPACE@_NAME_IS_KWSYS)
# define kwsys_std @KWSYS_NAMESPACE@_std
# endif
# if defined(@KWSYS_NAMESPACE@_NO_STD_NAMESPACE)
# define KWSYS_NO_STD_NAMESPACE
# endif
# if defined(@KWSYS_NAMESPACE@_NO_ANSI_STREAM_HEADERS)
# define KWSYS_NO_ANSI_STREAM_HEADERS
# endif
# if defined(@KWSYS_NAMESPACE@_NO_ANSI_STRING_STREAM)
# define KWSYS_NO_ANSI_STRING_STREAM
# endif
#endif
#endif
......@@ -39,6 +39,11 @@
#include <@KWSYS_NAMESPACE@/std/string>
/* Define this macro temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_NAME_IS_KWSYS)
# define kwsys_std @KWSYS_NAMESPACE@_std
#endif
namespace @KWSYS_NAMESPACE@
{
......@@ -382,4 +387,9 @@ inline kwsys_std::string RegularExpression::match(int n) const
} // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macro. */
#if !defined (KWSYS_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_NAME_IS_KWSYS)
# undef kwsys_std
#endif
#endif
......@@ -21,6 +21,11 @@
#include <@KWSYS_NAMESPACE@/std/string>
#include <@KWSYS_NAMESPACE@/std/vector>
/* Define this macro temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_NAME_IS_KWSYS)
# define kwsys_std @KWSYS_NAMESPACE@_std
#endif
namespace @KWSYS_NAMESPACE@
{
......@@ -287,4 +292,9 @@ protected:
} // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macro. */
#if !defined (KWSYS_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_NAME_IS_KWSYS)
# undef kwsys_std
#endif
#endif
......@@ -24,11 +24,11 @@
#pragma warning (disable: 4702)
#endif
#if !defined(KWSYS_NO_ANSI_STREAM_HEADERS)
#if !defined(@KWSYS_NAMESPACE@_NO_ANSI_STREAM_HEADERS)
# include <fstream>
#else
# include <fstream.h>
# if !defined(KWSYS_NO_STD_NAMESPACE) && !defined(KWSYS_FAKE_STD_NAMESPACE)
# if !defined(@KWSYS_NAMESPACE@_NO_STD_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_FAKE_STD_NAMESPACE)
namespace std
{
using ::ostream;
......
......@@ -24,7 +24,7 @@
#pragma warning (disable: 4702)
#endif
#if !defined(KWSYS_NO_ANSI_STREAM_HEADERS)
#if !defined(@KWSYS_NAMESPACE@_NO_ANSI_STREAM_HEADERS)
# include <iosfwd>
#else
class fstream;
......@@ -33,7 +33,7 @@ class ios;
class istream;
class ofstream;
class ostream;
# if !defined(KWSYS_NO_STD_NAMESPACE) && !defined(KWSYS_FAKE_STD_NAMESPACE)
# if !defined(@KWSYS_NAMESPACE@_NO_STD_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_FAKE_STD_NAMESPACE)
namespace std
{
using ::fstream;
......
......@@ -24,11 +24,11 @@
#pragma warning (disable: 4702)
#endif
#if !defined(KWSYS_NO_ANSI_STREAM_HEADERS)
#if !defined(@KWSYS_NAMESPACE@_NO_ANSI_STREAM_HEADERS)
# include <iostream>
#else
# include <iostream.h>
# if !defined(KWSYS_NO_STD_NAMESPACE) && !defined(KWSYS_FAKE_STD_NAMESPACE)
# if !defined(@KWSYS_NAMESPACE@_NO_STD_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_FAKE_STD_NAMESPACE)
namespace std
{
using ::ostream;
......
......@@ -19,7 +19,12 @@
#include <@KWSYS_NAMESPACE@/Configure.hxx>
#if !defined(KWSYS_NO_ANSI_STRING_STREAM)
/* Define this macro temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_NAME_IS_KWSYS)
# define kwsys_std @KWSYS_NAMESPACE@_std
#endif
#if !defined(@KWSYS_NAMESPACE@_NO_ANSI_STRING_STREAM)
# ifdef _MSC_VER
# pragma warning (push, 1)
# pragma warning (disable: 4702)
......@@ -33,11 +38,11 @@
# pragma warning (push, 1)
# pragma warning (disable: 4702)
# endif
# if !defined(KWSYS_NO_ANSI_STREAM_HEADERS)
# if !defined(@KWSYS_NAMESPACE@_NO_ANSI_STREAM_HEADERS)
# include <strstream>
# else
# include <strstream.h>
# if !defined(KWSYS_NO_STD_NAMESPACE) && !defined(KWSYS_FAKE_STD_NAMESPACE)
# if !defined(@KWSYS_NAMESPACE@_NO_STD_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_FAKE_STD_NAMESPACE)
namespace std
{
using ::ostream;
......@@ -60,7 +65,7 @@ namespace std
# include <@KWSYS_NAMESPACE@/std/string>
# if !defined(KWSYS_NO_STD_NAMESPACE)
# if !defined(@KWSYS_NAMESPACE@_NO_STD_NAMESPACE)
namespace std
{
# endif
......@@ -114,10 +119,15 @@ private:
void operator=(const istringstream&);
};
# if !defined(KWSYS_NO_STD_NAMESPACE)
# if !defined(@KWSYS_NAMESPACE@_NO_STD_NAMESPACE)
}
# endif
#endif
/* Undefine temporary macro. */
#if !defined (KWSYS_NAMESPACE) && !defined(@KWSYS_NAMESPACE@_NAME_IS_KWSYS)
# undef kwsys_std
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment