mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
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.
This commit is contained in:
@@ -25,17 +25,12 @@ bool cmAddCustomTargetCommand
|
||||
// Check the target name.
|
||||
if(args[0].find_first_of("/\\") != args[0].npos)
|
||||
{
|
||||
if(!this->Makefile->NeedBackwardsCompatibility(2,2))
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "called with invalid target name \"" << args[0]
|
||||
<< "\". Target names may not contain a slash. "
|
||||
<< "Use ADD_CUSTOM_COMMAND to generate files. "
|
||||
<< "Set CMAKE_BACKWARDS_COMPATIBILITY to 2.2 "
|
||||
<< "or lower to skip this check.";
|
||||
this->SetError(e.str().c_str());
|
||||
return false;
|
||||
}
|
||||
cmOStringStream e;
|
||||
e << "called with invalid target name \"" << args[0]
|
||||
<< "\". Target names may not contain a slash. "
|
||||
<< "Use ADD_CUSTOM_COMMAND to generate files.";
|
||||
this->SetError(e.str().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Accumulate one command line at a time.
|
||||
|
||||
Reference in New Issue
Block a user