diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-08-06 13:20:24 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-10-15 21:16:44 (GMT) |
commit | 2db55ffa56a69c4b55410afb9b40ab20f4025837 (patch) | |
tree | 78a498981c6d77fa0b148db021ca628b2d44a57b | |
parent | a7596fef6e8d6938ce0d7fcba47e896f288b12b4 (diff) | |
download | CMake-2db55ffa56a69c4b55410afb9b40ab20f4025837.zip CMake-2db55ffa56a69c4b55410afb9b40ab20f4025837.tar.gz CMake-2db55ffa56a69c4b55410afb9b40ab20f4025837.tar.bz2 |
Remove borland workarounds.
CMake 3.0 is the last release to require to be able to build with
Borland.
26 files changed, 9 insertions, 138 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 71850de..dfef067 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 f9405b3..ad1f8bc 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 c8737f4..94ca536 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 6c1d201..e5da5cf 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 2ec1365..cd84082 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -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", diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx index c5146c5..9f8a4de 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 48f5c8e..b1d53f6 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 7b49a9c..9d51025 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 d814f30..a987c13 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 586c0de..899f4d2 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 944d4b5..b66dc6d 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 77880c0..c12b42e 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 12c2e48..f2c85d0 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 1325cec..e6be9b4 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -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 diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 7fc1464..09d02ea 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -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 } //---------------------------------------------------------------------------- diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 3fc5b69..1c39563 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -19,9 +19,6 @@ #include <cmsys/RegularExpression.hxx> -#ifdef __BORLANDC__ -# pragma warn -8060 /* possibly incorrect assignment */ -#endif //---------------------------------------------------------------------------- struct cmListFileParser diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 8baf7b3..ffabd7a 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 <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)) diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h index acd636c..981e03e 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 <stdint.h> -#endif - /* Make sure SGI termios does not define ECHO differently. */ #if defined(__sgi) && !defined(__GNUC__) # include <sys/termios.h> diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index fbb4416..baf7582 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -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) { diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index af955ec..cc9f220 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 24de2b2..4738920 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 09d270d..cf1c8fb 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 03f10a0..97fd2ff 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 f1459d4..220a4c6 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 23549c5..27ec2d0 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 f161056..66e8be2 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) |