summaryrefslogtreecommitdiff
path: root/Source/cmStandardIncludes.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-08-08 11:54:46 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2001-08-08 11:54:46 -0400
commitdb1303aa7d00f49a0fdf66f120eb3e6cb0e445fe (patch)
treead569e72f02849e50e625faa1350bb05a3af08f9 /Source/cmStandardIncludes.h
parent61ec323b6a1c4e5a44331014447e3d1d31dc1b6b (diff)
downloadcmake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.tar.gz
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 'Source/cmStandardIncludes.h')
-rw-r--r--Source/cmStandardIncludes.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index dded33bd2c..70c280a932 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -54,8 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#pragma warning ( disable : 4503 )
-// for loop scoping hack
-#define for if(false) {} else for
+#define CMAKE_NO_ANSI_FOR_SCOPE
#endif
#ifdef __ICL
@@ -72,6 +71,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <strstream.h>
#endif
+// we must have stl with the standard include style
#include <vector>
#include <string>
#include <iterator>
@@ -81,13 +81,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <list>
#include <set>
+// include the "c" string header
#include <string.h>
+// if std:: is not supported, then just #define it away
#ifdef CMAKE_NO_STD_NAMESPACE
#define std
-#define for if(false) {} else for
#endif
+// if the compiler does not support ansi for scoping of vars use a
+// #define hack
+#ifdef CMAKE_NO_ANSI_FOR_SCOPE
+#define for if(false) {} else for
+#endif
// check for the 720 compiler on the SGI
// which has some strange properties that I don't think are worth
@@ -100,7 +106,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# endif
#endif
-
# ifdef CM_SGI_CC_720
// the 720 sgi compiler has std:: but not for the stream library,
// so we have to bring it into the std namespace by hand.
@@ -124,9 +129,6 @@ inline bool operator!=(std::string const& a, const char* b)
inline bool operator==(std::string const& a, const char* b)
{ return (a==std::string(b)); }
-// for scoping is not ISO, so use the for hack
-#define for if(false) {} else for
-
-# endif
+# endif // end CM_SGI_CC_720
#endif