diff options
author | Brad King <brad.king@kitware.com> | 2013-10-18 15:25:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-23 12:54:31 (GMT) |
commit | 7d47c693650672afabc46bd200246eb9130582d6 (patch) | |
tree | 0a1ad731d0622c629584a6518e124dfb8e7b5661 /Source/cmake.cxx | |
parent | c7c44fc7f4a32163b9fd82e5560fa35df60d2fb4 (diff) | |
download | CMake-7d47c693650672afabc46bd200246eb9130582d6.zip CMake-7d47c693650672afabc46bd200246eb9130582d6.tar.gz CMake-7d47c693650672afabc46bd200246eb9130582d6.tar.bz2 |
Drop compatibility with CMake < 2.4
Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
a value lower than 2.4, and generate an error when projects or the user
attempt to do so. In the error suggest using a CMake 2.8.x release.
Teach cmake_minimum_required to warn about projects that do not require
at least CMake 2.4. They are not supported by CMake >= 3.0.
Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
reference to policy CMP0001.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 6822fe1..186d4e6 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -99,30 +99,6 @@ static bool cmakeCheckStampFile(const char* stampName); static bool cmakeCheckStampList(const char* stampName); -void cmNeedBackwardsCompatibility(const std::string& variable, - int access_type, void*, const char*, const cmMakefile*) -{ -#ifdef CMAKE_BUILD_WITH_CMAKE - if (access_type == cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS) - { - std::string message = "An attempt was made to access a variable: "; - message += variable; - message += - " that has not been defined. Some variables were always defined " - "by CMake in versions prior to 1.6. To fix this you might need to set " - "the cache value of CMAKE_BACKWARDS_COMPATIBILITY to 1.4 or less. If " - "you are writing a CMakeLists file, (or have already set " - "CMAKE_BACKWARDS_COMPATIBILITY to 1.4 or less) then you probably need " - "to include a CMake module to test for the feature this variable " - "defines."; - cmSystemTools::Error(message.c_str()); - } -#else - (void)variable; - (void)access_type; -#endif -} - void cmWarnUnusedCliWarning(const std::string& variable, int, void* ctx, const char*, const cmMakefile*) { @@ -169,12 +145,6 @@ cmake::cmake() #ifdef CMAKE_BUILD_WITH_CMAKE this->VariableWatch = new cmVariableWatch; - this->VariableWatch->AddWatch("CMAKE_WORDS_BIGENDIAN", - cmNeedBackwardsCompatibility); - this->VariableWatch->AddWatch("CMAKE_SIZEOF_INT", - cmNeedBackwardsCompatibility); - this->VariableWatch->AddWatch("CMAKE_X_LIBS", - cmNeedBackwardsCompatibility); #endif this->AddDefaultGenerators(); |