summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-08-01 15:38:42 (GMT)
committerBrad King <brad.king@kitware.com>2006-08-01 15:38:42 (GMT)
commitab61137eb177d9606ad3fa47b6b08d22b9993279 (patch)
treece57b66cd29b6dc1dab00d196eeeda84e8ef82a2
parent7776d18896bda01c743317dd45fd5c816e8f408a (diff)
downloadCMake-ab61137eb177d9606ad3fa47b6b08d22b9993279.zip
CMake-ab61137eb177d9606ad3fa47b6b08d22b9993279.tar.gz
CMake-ab61137eb177d9606ad3fa47b6b08d22b9993279.tar.bz2
COMP: Fix and/or disable warnings for Borland 5.6 build.
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx3
-rw-r--r--Source/cmCommandArgumentLexer.cxx5
-rw-r--r--Source/cmCommandArgumentLexer.in.l5
-rw-r--r--Source/cmCommandArgumentParser.cxx3
-rw-r--r--Source/cmCommandArgumentParser.y6
-rw-r--r--Source/cmDependsFortranLexer.cxx5
-rw-r--r--Source/cmDependsFortranLexer.in.l5
-rw-r--r--Source/cmDependsFortranParser.cxx3
-rw-r--r--Source/cmDependsFortranParser.y3
-rw-r--r--Source/cmDependsJavaLexer.cxx5
-rw-r--r--Source/cmDependsJavaLexer.in.l5
-rw-r--r--Source/cmDependsJavaParser.cxx3
-rw-r--r--Source/cmDependsJavaParser.y3
-rw-r--r--Source/cmExprLexer.cxx5
-rw-r--r--Source/cmExprLexer.in.l5
-rw-r--r--Source/cmExprParser.cxx3
-rw-r--r--Source/cmExprParser.y3
-rw-r--r--Source/cmListFileCache.cxx4
-rw-r--r--Source/cmListFileLexer.c5
-rw-r--r--Source/cmListFileLexer.in.l5
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
-rw-r--r--Source/cmSetCommand.cxx2
-rw-r--r--Source/cmStandardIncludes.h4
-rw-r--r--Source/cmTarget.cxx18
-rw-r--r--Source/cmWin32ProcessExecution.cxx12
-rw-r--r--Source/kwsys/CommandLineArguments.cxx2
-rw-r--r--Source/kwsys/SystemTools.cxx2
-rw-r--r--Source/kwsys/testProcess.c5
-rw-r--r--Utilities/cmcurl/CMakeLists.txt5
-rw-r--r--Utilities/cmtar/CMakeLists.txt5
-rw-r--r--Utilities/cmxmlrpc/CMakeLists.txt5
-rw-r--r--Utilities/cmzlib/CMakeLists.txt5
33 files changed, 131 insertions, 22 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 36a80ce..44f41f3 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -37,6 +37,9 @@
#include <math.h>
#include <float.h>
+#if defined(__BORLANDC__)
+# pragma warn -8060 /* possibly incorrect assignment */
+#endif
static const char* cmCTestErrorMatches[] = {
"^[Bb]us [Ee]rror",
diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx
index fb38219..1f49ad1 100644
--- a/Source/cmCommandArgumentLexer.cxx
+++ b/Source/cmCommandArgumentLexer.cxx
@@ -492,6 +492,11 @@ Modify cmCommandArgumentLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l
index 80afa03..7aa90e6 100644
--- a/Source/cmCommandArgumentLexer.in.l
+++ b/Source/cmCommandArgumentLexer.in.l
@@ -53,6 +53,11 @@ Modify cmCommandArgumentLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx
index 1f219dd..fdfe657 100644
--- a/Source/cmCommandArgumentParser.cxx
+++ b/Source/cmCommandArgumentParser.cxx
@@ -162,6 +162,9 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y
index 050d710..44bd97e 100644
--- a/Source/cmCommandArgumentParser.y
+++ b/Source/cmCommandArgumentParser.y
@@ -62,10 +62,14 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
-# pragma warning (disable: 4065) /* Switch statement contains default but no case. */
+# pragma warning (disable: 4065) /* Switch statement contains default but no
+ case. */
#endif
%}
diff --git a/Source/cmDependsFortranLexer.cxx b/Source/cmDependsFortranLexer.cxx
index d9c370f..b8feb17 100644
--- a/Source/cmDependsFortranLexer.cxx
+++ b/Source/cmDependsFortranLexer.cxx
@@ -656,6 +656,11 @@ Modify cmDependsFortranLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#define ECHO
diff --git a/Source/cmDependsFortranLexer.in.l b/Source/cmDependsFortranLexer.in.l
index a9ed256..f95ccdb 100644
--- a/Source/cmDependsFortranLexer.in.l
+++ b/Source/cmDependsFortranLexer.in.l
@@ -64,6 +64,11 @@ Modify cmDependsFortranLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#define ECHO
diff --git a/Source/cmDependsFortranParser.cxx b/Source/cmDependsFortranParser.cxx
index 2f64764..dc69e36 100644
--- a/Source/cmDependsFortranParser.cxx
+++ b/Source/cmDependsFortranParser.cxx
@@ -191,6 +191,9 @@ static void cmDependsFortranError(yyscan_t yyscanner, const char* message)
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmDependsFortranParser.y b/Source/cmDependsFortranParser.y
index be04c38..aec8e21 100644
--- a/Source/cmDependsFortranParser.y
+++ b/Source/cmDependsFortranParser.y
@@ -65,6 +65,9 @@ static void cmDependsFortranError(yyscan_t yyscanner, const char* message)
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx
index bee9e24..aa7b571 100644
--- a/Source/cmDependsJavaLexer.cxx
+++ b/Source/cmDependsJavaLexer.cxx
@@ -689,6 +689,11 @@ Modify cmDependsJavaLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmDependsJavaLexer.in.l b/Source/cmDependsJavaLexer.in.l
index 22879b9..3ca61a3 100644
--- a/Source/cmDependsJavaLexer.in.l
+++ b/Source/cmDependsJavaLexer.in.l
@@ -53,6 +53,11 @@ Modify cmDependsJavaLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx
index 2b1690c..5405c05 100644
--- a/Source/cmDependsJavaParser.cxx
+++ b/Source/cmDependsJavaParser.cxx
@@ -338,6 +338,9 @@ yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str))
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmDependsJavaParser.y b/Source/cmDependsJavaParser.y
index def6f2d..1d8956d 100644
--- a/Source/cmDependsJavaParser.y
+++ b/Source/cmDependsJavaParser.y
@@ -58,6 +58,9 @@ static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx
index 093e206..045cf11 100644
--- a/Source/cmExprLexer.cxx
+++ b/Source/cmExprLexer.cxx
@@ -491,6 +491,11 @@ Modify cmExprLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmExprLexer.in.l b/Source/cmExprLexer.in.l
index 7e6b6cd..bc2ec1c 100644
--- a/Source/cmExprLexer.in.l
+++ b/Source/cmExprLexer.in.l
@@ -53,6 +53,11 @@ Modify cmExprLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx
index e973d1c..6c55f22 100644
--- a/Source/cmExprParser.cxx
+++ b/Source/cmExprParser.cxx
@@ -159,6 +159,9 @@ static void cmExprError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y
index 27935f6..2451abb 100644
--- a/Source/cmExprParser.y
+++ b/Source/cmExprParser.y
@@ -58,6 +58,9 @@ static void cmExprError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 9457a0c..e1ca49c 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -21,6 +21,10 @@
#include <cmsys/RegularExpression.hxx>
+#ifdef __BORLANDC__
+# pragma warn -8060 /* possibly incorrect assignment */
+#endif
+
bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
cmListFileFunction& function,
const char* filename);
diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c
index 1f8797c..8f5def6 100644
--- a/Source/cmListFileLexer.c
+++ b/Source/cmListFileLexer.c
@@ -530,6 +530,11 @@ Modify cmListFileLexer.c:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
#include "cmListFileLexer.h"
/*--------------------------------------------------------------------------*/
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l
index 02ad520..00b38be 100644
--- a/Source/cmListFileLexer.in.l
+++ b/Source/cmListFileLexer.in.l
@@ -56,6 +56,11 @@ Modify cmListFileLexer.c:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
#include "cmListFileLexer.h"
/*--------------------------------------------------------------------------*/
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 94c9094..fea2bd6 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1158,7 +1158,7 @@ cmLocalUnixMakefileGenerator3
bool cmLocalUnixMakefileGenerator3::ScanDependencies(const char* tgtInfo)
{
// The info file for this target
- std::string const& infoFile = tgtInfo;
+ std::string infoFile = tgtInfo;
// Read the directory information file.
cmMakefile* mf = this->Makefile;
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 335aa12..cadd0cb 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -58,7 +58,7 @@ cmMakefileTargetGenerator::New(cmLocalUnixMakefileGenerator3 *lg,
break;
default:
return result;
- break;
+ // break; /* unreachable */
}
result->TargetName = tgtName;
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index c0bf6ce..ffa2ce0 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -92,7 +92,7 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args)
}
// collect any values into a single semi-colon seperated value list
- if(args.size() >
+ if(static_cast<unsigned short>(args.size()) >
static_cast<unsigned short>(1 + (cache ? 3 : 0) + (force ? 1 : 0)))
{
value = args[1];
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index 39a6059..2d88251 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -43,6 +43,10 @@
#define CMAKE_NO_ANSI_FOR_SCOPE
#endif
+#ifdef __BORLANDC__
+#pragma warn -8030 /* Temporary used for parameter */
+#endif
+
#ifdef __ICL
#pragma warning ( disable : 985 )
#endif
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 26bc47d..c895907 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -915,31 +915,31 @@ const char *cmTarget::GetProperty(const char* prop)
{
case cmTarget::STATIC_LIBRARY:
return "STATIC_LIBRARY";
- break;
+ // break; /* unreachable */
case cmTarget::MODULE_LIBRARY:
return "MODULE_LIBRARY";
- break;
+ // break; /* unreachable */
case cmTarget::SHARED_LIBRARY:
return "SHARED_LIBRARY";
- break;
+ // break; /* unreachable */
case cmTarget::EXECUTABLE:
return "EXECUTABLE";
- break;
+ // break; /* unreachable */
case cmTarget::UTILITY:
return "UTILITY";
- break;
+ // break; /* unreachable */
case cmTarget::GLOBAL_TARGET:
return "GLOBAL_TARGET";
- break;
+ // break; /* unreachable */
case cmTarget::INSTALL_FILES:
return "INSTALL_FILES";
- break;
+ // break; /* unreachable */
case cmTarget::INSTALL_PROGRAMS:
return "INSTALL_PROGRAMS";
- break;
+ // break; /* unreachable */
case cmTarget::INSTALL_DIRECTORY:
return "INSTALL_DIRECTORY";
- break;
+ // break; /* unreachable */
}
return 0;
}
diff --git a/Source/cmWin32ProcessExecution.cxx b/Source/cmWin32ProcessExecution.cxx
index 88b0127..ed7b1ea 100644
--- a/Source/cmWin32ProcessExecution.cxx
+++ b/Source/cmWin32ProcessExecution.cxx
@@ -293,14 +293,14 @@ static BOOL RealPopenCreateProcess(const char *cmdstring,
PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;
char *s1=0,*s2=0, *s3 = " /c ";
- int i;
- int x;
- if (i = GetEnvironmentVariable("COMSPEC",NULL,0))
+ int i = GetEnvironmentVariable("COMSPEC",NULL,0);
+ if (i)
{
char *comshell;
s1 = (char *)malloc(i);
- if (!(x = GetEnvironmentVariable("COMSPEC", s1, i)))
+ int x = GetEnvironmentVariable("COMSPEC", s1, i);
+ if (!x)
{
free(s1);
return x;
@@ -607,7 +607,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring,
case POPEN_2:
case POPEN_4:
- if ( 1 )
+ //if ( 1 )
{
fd1 = _open_osfhandle(TO_INTPTR(this->hChildStdinWrDup), mode);
fd2 = _open_osfhandle(TO_INTPTR(this->hChildStdoutRdDup), mode);
@@ -615,7 +615,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring,
}
case POPEN_3:
- if ( 1)
+ //if ( 1)
{
fd1 = _open_osfhandle(TO_INTPTR(this->hChildStdinWrDup), mode);
fd2 = _open_osfhandle(TO_INTPTR(this->hChildStdoutRdDup), mode);
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index 20fb3ef..5a550b5 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/CommandLineArguments.cxx
@@ -216,7 +216,7 @@ int CommandLineArguments::Parse()
// additional value
CommandLineArgumentsCallbackStructure *cs
= &this->Internals->Callbacks[matches[maxidx]];
- const CommandLineArguments::Internal::String& sarg = matches[maxidx];
+ const kwsys_stl::string& sarg = matches[maxidx];
if ( cs->Argument != sarg )
{
abort();
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index c6b57c0..bd824d3 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3348,7 +3348,7 @@ kwsys_stl::string SystemTools::GetCurrentDateTime(const char* format)
time_t t;
time(&t);
strftime(buf, sizeof(buf), format, localtime(&t));
- return buf;
+ return kwsys_stl::string(buf);
}
kwsys_stl::string SystemTools::MakeCindentifier(const char* s)
diff --git a/Source/kwsys/testProcess.c b/Source/kwsys/testProcess.c
index f87f1e0..e9fc224 100644
--- a/Source/kwsys/testProcess.c
+++ b/Source/kwsys/testProcess.c
@@ -30,6 +30,10 @@
# include <unistd.h>
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8060 /* possibly incorrect assignment */
+#endif
+
int runChild(const char* cmd[], int state, int exception, int value,
int share, int output, int delay, double timeout, int poll,
int repeat, int disown);
@@ -196,7 +200,6 @@ int test8_grandchild(int argc, const char* argv[])
return 0;
}
-
int runChild2(kwsysProcess* kp,
const char* cmd[], int state, int exception, int value,
int share, int output, int delay, double timeout,
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 72c157d..c32504f 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -18,6 +18,11 @@ SET(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
+# Disable warnings on Borland to avoid changing 3rd party code.
+IF(BORLAND)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
+ENDIF(BORLAND)
+
# If we are on AIX, do the _ALL_SOURCE magic
IF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
SET(_ALL_SOURCE 1)
diff --git a/Utilities/cmtar/CMakeLists.txt b/Utilities/cmtar/CMakeLists.txt
index 1c3b470..a56fc84 100644
--- a/Utilities/cmtar/CMakeLists.txt
+++ b/Utilities/cmtar/CMakeLists.txt
@@ -6,6 +6,11 @@ INCLUDE_REGULAR_EXPRESSION("^.*$")
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
+# Disable warnings on Borland to avoid changing 3rd party code.
+IF(BORLAND)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
+ENDIF(BORLAND)
+
# If we are on AIX, do the _ALL_SOURCE magic
IF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
SET(_ALL_SOURCE 1)
diff --git a/Utilities/cmxmlrpc/CMakeLists.txt b/Utilities/cmxmlrpc/CMakeLists.txt
index 2d96d50..a29e0bd 100644
--- a/Utilities/cmxmlrpc/CMakeLists.txt
+++ b/Utilities/cmxmlrpc/CMakeLists.txt
@@ -2,6 +2,11 @@ PROJECT(XMLRPC)
INCLUDE_REGULAR_EXPRESSION("^.*$")
+# Disable warnings on Borland to avoid changing 3rd party code.
+IF(BORLAND)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
+ENDIF(BORLAND)
+
# Include all the necessary files for macros
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt
index 3dedcd4..f359082 100644
--- a/Utilities/cmzlib/CMakeLists.txt
+++ b/Utilities/cmzlib/CMakeLists.txt
@@ -14,6 +14,11 @@ ADD_DEFINITIONS(-DCMZLIB_IN_C)
# Match all headers for dependencies but complain about none.
INCLUDE_REGULAR_EXPRESSION("^.*$")
+# Disable warnings on Borland to avoid changing 3rd party code.
+IF(BORLAND)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
+ENDIF(BORLAND)
+
# source files for zlib
SET(ZLIB_SRCS
adler32.c gzio.c inftrees.c uncompr.c