From 2db55ffa56a69c4b55410afb9b40ab20f4025837 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 6 Aug 2014 15:20:24 +0200 Subject: [PATCH] Remove borland workarounds. CMake 3.0 is the last release to require to be able to build with Borland. --- CMakeLists.txt | 2 +- Source/CMakeLists.txt | 2 +- Source/CPack/cmCPackGeneratorFactory.cxx | 3 --- Source/CPack/cmCPackSTGZGenerator.cxx | 2 -- Source/CTest/cmCTestBuildHandler.cxx | 3 --- Source/cmCommandArgumentParser.cxx | 6 ------ Source/cmCommandArgumentParser.y | 6 ------ Source/cmDependsFortranParser.cxx | 6 ------ Source/cmDependsFortranParser.y | 6 ------ Source/cmDependsJavaParser.cxx | 6 ------ Source/cmDependsJavaParser.y | 6 ------ Source/cmExprParser.cxx | 6 ------ Source/cmExprParser.y | 6 ------ Source/cmFileCommand.cxx | 2 -- Source/cmGeneratorExpression.cxx | 8 -------- Source/cmListFileCache.cxx | 3 --- Source/cmStandardIncludes.h | 21 +-------------------- Source/cmStandardLexer.h | 19 ------------------- Source/cmSystemTools.cxx | 6 +----- Source/cmWriteFileCommand.cxx | 2 -- Source/cm_sha2.c | 3 --- Source/cmake.cxx | 4 +--- Utilities/cmcurl/CMakeLists.txt | 5 ----- Utilities/cmlibarchive/CMakeLists.txt | 2 -- Utilities/cmliblzma/CMakeLists.txt | 2 -- Utilities/cmzlib/CMakeLists.txt | 10 ++++------ 26 files changed, 9 insertions(+), 138 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71850de95..dfef06742 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index f9405b364..ad1f8bc89 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -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) diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index c8737f40b..94ca53611 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -47,9 +47,6 @@ #include "cmCPackLog.h" -#if defined(__BORLANDC__) -# pragma warn -8008 /* condition is always true */ -#endif //---------------------------------------------------------------------- cmCPackGeneratorFactory::cmCPackGeneratorFactory() diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 6c1d20189..e5da5cfe1 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -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 | diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 2ec136541..cd84082c5 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -36,9 +36,6 @@ #include #include -#if defined(__BORLANDC__) -# pragma warn -8060 /* possibly incorrect assignment */ -#endif static const char* cmCTestErrorMatches[] = { "^[Bb]us [Ee]rror", diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx index c5146c5d7..9f8a4de7f 100644 --- a/Source/cmCommandArgumentParser.cxx +++ b/Source/cmCommandArgumentParser.cxx @@ -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 diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y index 48f5c8ecd..b1d53f6ed 100644 --- a/Source/cmCommandArgumentParser.y +++ b/Source/cmCommandArgumentParser.y @@ -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 diff --git a/Source/cmDependsFortranParser.cxx b/Source/cmDependsFortranParser.cxx index 7b49a9c5c..9d51025dd 100644 --- a/Source/cmDependsFortranParser.cxx +++ b/Source/cmDependsFortranParser.cxx @@ -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. */ diff --git a/Source/cmDependsFortranParser.y b/Source/cmDependsFortranParser.y index d814f3075..a987c13bc 100644 --- a/Source/cmDependsFortranParser.y +++ b/Source/cmDependsFortranParser.y @@ -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. */ diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx index 586c0debe..899f4d2c5 100644 --- a/Source/cmDependsJavaParser.cxx +++ b/Source/cmDependsJavaParser.cxx @@ -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 diff --git a/Source/cmDependsJavaParser.y b/Source/cmDependsJavaParser.y index 944d4b5ce..b66dc6d7e 100644 --- a/Source/cmDependsJavaParser.y +++ b/Source/cmDependsJavaParser.y @@ -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. */ diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx index 77880c0a3..c12b42e70 100644 --- a/Source/cmExprParser.cxx +++ b/Source/cmExprParser.cxx @@ -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 diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y index 12c2e4806..f2c85d097 100644 --- a/Source/cmExprParser.y +++ b/Source/cmExprParser.y @@ -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. */ diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 1325cec92..e6be9b48b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -220,8 +220,6 @@ bool cmFileCommand::HandleWriteCommand(std::vector 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 diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 7fc1464c3..09d02ea6f 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -33,18 +33,10 @@ cmGeneratorExpression::cmGeneratorExpression( cmsys::auto_ptr cmGeneratorExpression::Parse(std::string const& input) { -#if !defined(__BORLANDC__) return cmsys::auto_ptr( new cmCompiledGeneratorExpression( this->Backtrace ? *this->Backtrace : cmListFileBacktrace(NULL), input)); -#else - cmListFileBacktrace emptyBacktrace(NULL); - return cmsys::auto_ptr( - new cmCompiledGeneratorExpression( - this->Backtrace ? *this->Backtrace : emptyBacktrace, - input)); -#endif } //---------------------------------------------------------------------------- diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 3fc5b69c4..1c395632e 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -19,9 +19,6 @@ #include -#ifdef __BORLANDC__ -# pragma warn -8060 /* possibly incorrect assignment */ -#endif //---------------------------------------------------------------------------- struct cmListFileParser diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 8baf7b303..ffabd7aca 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -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 @@ -112,10 +102,6 @@ public: #include #include -#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... functions from string.h */ -# include /* 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)) diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h index acd636c43..981e03ec8 100644 --- a/Source/cmStandardLexer.h +++ b/Source/cmStandardLexer.h @@ -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 -#endif - /* Make sure SGI termios does not define ECHO differently. */ #if defined(__sgi) && !defined(__GNUC__) # include diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index fbb44160c..baf758296 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -52,8 +52,7 @@ #include #if defined(_WIN32) && \ - (defined(_MSC_VER) || defined(__WATCOMC__) || \ - defined(__BORLANDC__) || defined(__MINGW32__)) + (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__)) # include #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) { diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index af955ecf8..cc9f22003 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -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 diff --git a/Source/cm_sha2.c b/Source/cm_sha2.c index 24de2b294..473892070 100644 --- a/Source/cm_sha2.c +++ b/Source/cm_sha2.c @@ -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 diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 09d270d59..cf1c8fb6b 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -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 diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 03f10a0c9..97fd2ffce 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -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) diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt index f1459d455..220a4c6d2 100644 --- a/Utilities/cmlibarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/CMakeLists.txt @@ -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 diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt index 23549c586..27ec2d0f1 100644 --- a/Utilities/cmliblzma/CMakeLists.txt +++ b/Utilities/cmliblzma/CMakeLists.txt @@ -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}) diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt index f161056e5..66e8be204 100644 --- a/Utilities/cmzlib/CMakeLists.txt +++ b/Utilities/cmzlib/CMakeLists.txt @@ -18,12 +18,10 @@ 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) - ENDIF(NOT UNIX) + IF(NOT MINGW) + SET(ZLIB_SRCS ${ZLIB_SRCS} zlib.def zlib.rc ) + ENDIF(NOT MINGW) + ENDIF(NOT UNIX) ENDIF(BUILD_SHARED_LIBS) ENDIF(WIN32)