Remove borland workarounds.

CMake 3.0 is the last release to require to be able to build with
Borland.
This commit is contained in:
Stephen Kelly 2014-08-06 15:20:24 +02:00
parent a7596fef6e
commit 2db55ffa56
26 changed files with 9 additions and 138 deletions

View File

@ -115,7 +115,7 @@ endmacro()
if(NOT CMake_TEST_EXTERNAL_CMAKE)
set(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
if(WIN32 AND NOT UNIX AND NOT MINGW)
set(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
endif()
endif()

View File

@ -473,7 +473,7 @@ set(SRCS ${SRCS}
cmNinjaUtilityTargetGenerator.cxx
cmNinjaUtilityTargetGenerator.h
)
if(WIN32 AND NOT CYGWIN AND NOT BORLAND)
if(WIN32 AND NOT CYGWIN)
set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
add_executable(cmcldeps cmcldeps.cxx)
target_link_libraries(cmcldeps CMakeLib)

View File

@ -47,9 +47,6 @@
#include "cmCPackLog.h"
#if defined(__BORLANDC__)
# pragma warn -8008 /* condition is always true */
#endif
//----------------------------------------------------------------------
cmCPackGeneratorFactory::cmCPackGeneratorFactory()

View File

@ -71,8 +71,6 @@ int cmCPackSTGZGenerator::PackageFiles()
retval &= cmSystemTools::SetPermissions((*it).c_str(),
#if defined( _MSC_VER ) || defined( __MINGW32__ )
S_IREAD | S_IWRITE | S_IEXEC
#elif defined( __BORLANDC__ )
S_IRUSR | S_IWUSR | S_IXUSR
#else
S_IRUSR | S_IWUSR | S_IXUSR |
S_IRGRP | S_IWGRP | S_IXGRP |

View File

@ -36,9 +36,6 @@
#include <math.h>
#include <float.h>
#if defined(__BORLANDC__)
# pragma warn -8060 /* possibly incorrect assignment */
#endif
static const char* cmCTestErrorMatches[] = {
"^[Bb]us [Ee]rror",

View File

@ -183,12 +183,6 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
#define YYINITDEPTH 10000
/* 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

View File

@ -64,12 +64,6 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
#define YYINITDEPTH 10000
/* 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

View File

@ -144,12 +144,6 @@ static bool cmDependsFortranParserIsKeyword(const char* word,
}
/* 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 contains default but no case. */

View File

@ -68,12 +68,6 @@ static bool cmDependsFortranParserIsKeyword(const char* word,
}
/* 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 contains default but no case. */

View File

@ -336,12 +336,6 @@ static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
#define jpStoreClass(str) \
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. */
# pragma warning (disable: 4065) /* Switch statement contains default but

View File

@ -52,12 +52,6 @@ static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval)
#define jpStoreClass(str) 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. */
# pragma warning (disable: 4065) /* Switch statement contains default but no case. */

View File

@ -157,12 +157,6 @@ 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. */
# pragma warning (disable: 4065) /* Switch statement contains default but

View File

@ -52,12 +52,6 @@ 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. */
# pragma warning (disable: 4065) /* Switch statement contains default but no case. */

View File

@ -220,8 +220,6 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
cmSystemTools::SetPermissions(fileName.c_str(),
#if defined( _MSC_VER ) || defined( __MINGW32__ )
mode | S_IWRITE
#elif defined( __BORLANDC__ )
mode | S_IWUSR
#else
mode | S_IWUSR | S_IWGRP
#endif

View File

@ -33,18 +33,10 @@ cmGeneratorExpression::cmGeneratorExpression(
cmsys::auto_ptr<cmCompiledGeneratorExpression>
cmGeneratorExpression::Parse(std::string const& input)
{
#if !defined(__BORLANDC__)
return cmsys::auto_ptr<cmCompiledGeneratorExpression>(
new cmCompiledGeneratorExpression(
this->Backtrace ? *this->Backtrace : cmListFileBacktrace(NULL),
input));
#else
cmListFileBacktrace emptyBacktrace(NULL);
return cmsys::auto_ptr<cmCompiledGeneratorExpression>(
new cmCompiledGeneratorExpression(
this->Backtrace ? *this->Backtrace : emptyBacktrace,
input));
#endif
}
//----------------------------------------------------------------------------

View File

@ -19,9 +19,6 @@
#include <cmsys/RegularExpression.hxx>
#ifdef __BORLANDC__
# pragma warn -8060 /* possibly incorrect assignment */
#endif
//----------------------------------------------------------------------------
struct cmListFileParser

View File

@ -28,12 +28,6 @@
#define CMAKE_NO_ANSI_FOR_SCOPE
#endif
#ifdef __BORLANDC__
# pragma warn -8030 /* Temporary used for parameter */
# pragma warn -8027 /* 'for' not inlined. */
# pragma warn -8026 /* 'exception' not inlined. */
# pragma warn -8004 /* value never used */
#endif
#ifdef __ICL
#pragma warning ( disable : 985 )
@ -78,10 +72,6 @@ public:
#if defined(_MSC_VER)
# pragma warning (push,1)
#endif
#if defined(__BORLANDC__)
# pragma warn -8008 /* condition is always false (RESET BELOW!) */
# pragma warn -8066 /* unreachable code (RESET BELOW!) */
#endif
#ifndef CMAKE_NO_ANSI_STREAM_HEADERS
# include <fstream>
@ -112,10 +102,6 @@ public:
#include <set>
#include <deque>
#if defined(__BORLANDC__)
# pragma warn .8008 /* condition is always false (disabled above) */
# pragma warn .8066 /* unreachable code (disabled above) */
#endif
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
@ -134,10 +120,6 @@ public:
// include blockers are put in place that prevent including the
// C-style versions from ever including the sub-headers. Therefore we
// have to include the sub-headers here to get the using declarations.
#if defined(__BORLANDC__)
# include <mem.h> /* mem... functions from string.h */
# include <search.h> /* search functions from stdlib.h */
#endif
#if !defined(_WIN32) && defined(__COMO__)
@ -412,8 +394,7 @@ inline bool cmHasLiteralSuffixImpl(const char* str1,
}
#if defined(_MSC_VER) && _MSC_VER < 1300 \
|| defined(__GNUC__) && __GNUC__ < 3 \
|| defined(__BORLANDC__)
|| defined(__GNUC__) && __GNUC__ < 3
#define cmArrayBegin(a) a
#define cmArraySize(a) (sizeof(a)/sizeof(*a))

View File

@ -25,25 +25,6 @@
# pragma warning ( disable : 4786 )
#endif
#if defined(__BORLANDC__)
# pragma warn -8008 /* condition always returns true */
# pragma warn -8066 /* unreachable code */
#endif
/* Borland system header defines these macros without first undef-ing them. */
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x580
# undef INT8_MIN
# undef INT16_MIN
# undef INT32_MIN
# undef INT8_MAX
# undef INT16_MAX
# undef INT32_MAX
# undef UINT8_MAX
# undef UINT16_MAX
# undef UINT32_MAX
# include <stdint.h>
#endif
/* Make sure SGI termios does not define ECHO differently. */
#if defined(__sgi) && !defined(__GNUC__)
# include <sys/termios.h>

View File

@ -52,8 +52,7 @@
#include <sys/stat.h>
#if defined(_WIN32) && \
(defined(_MSC_VER) || defined(__WATCOMC__) || \
defined(__BORLANDC__) || defined(__MINGW32__))
(defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__))
# include <io.h>
#endif
@ -1649,9 +1648,6 @@ namespace{
fprintf(out, " -> %s", archive_entry_symlink(entry));
}
}
#ifdef __BORLANDC__
# pragma warn -8066 /* unreachable code */
#endif
long copy_data(struct archive *ar, struct archive *aw)
{

View File

@ -63,8 +63,6 @@ bool cmWriteFileCommand
cmSystemTools::SetPermissions(fileName.c_str(),
#if defined( _MSC_VER ) || defined( __MINGW32__ )
mode | S_IWRITE
#elif defined( __BORLANDC__ )
mode | S_IWUSR
#else
mode | S_IWUSR | S_IWGRP
#endif

View File

@ -103,9 +103,6 @@ typedef cm_sha2_uint32_t sha_word32; /* Exactly 4 bytes */
typedef cm_sha2_uint64_t sha_word64; /* Exactly 8 bytes */
#define SHA_UINT32_C(x) cmIML_INT_UINT32_C(x)
#define SHA_UINT64_C(x) cmIML_INT_UINT64_C(x)
#if defined(__BORLANDC__)
# pragma warn -8004 /* variable assigned value that is never used */
#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wcast-align"
#endif

View File

@ -1377,9 +1377,7 @@ int cmake::ActualConfigure()
}
else
{
#if defined(__BORLANDC__) && defined(_WIN32)
this->SetGlobalGenerator(new cmGlobalBorlandMakefileGenerator);
#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
std::string installedCompiler;
// Try to find the newest VS installed on the computer and
// use that as a default if -G is not specified

View File

@ -19,11 +19,6 @@ 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)

View File

@ -61,8 +61,6 @@ IF("${CMAKE_C_COMPILER_ID}" MATCHES
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
ELSEIF("${CMAKE_C_COMPILER_ID}" MATCHES "^(PathScale)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
ELSEIF(BORLAND)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
ENDIF()
# Enable CTest/CDash support

View File

@ -206,8 +206,6 @@ IF("${CMAKE_C_COMPILER_ID}" MATCHES
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
ELSEIF("${CMAKE_C_COMPILER_ID}" MATCHES "^(PathScale)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
ELSEIF(BORLAND)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
ENDIF()
ADD_LIBRARY(cmliblzma ${LZMA_SRCS})

View File

@ -18,11 +18,9 @@ IF(WIN32)
IF(BUILD_SHARED_LIBS)
SET(ZLIB_DLL 1)
IF(NOT UNIX)
IF(NOT BORLAND)
IF(NOT MINGW)
SET(ZLIB_SRCS ${ZLIB_SRCS} zlib.def zlib.rc )
ENDIF(NOT MINGW)
ENDIF(NOT BORLAND)
IF(NOT MINGW)
SET(ZLIB_SRCS ${ZLIB_SRCS} zlib.def zlib.rc )
ENDIF(NOT MINGW)
ENDIF(NOT UNIX)
ENDIF(BUILD_SHARED_LIBS)
ENDIF(WIN32)