ENH: put back old style call to SOURCE_GROUP, no need to break things for this

This commit is contained in:
Bill Hoffman 2003-07-28 14:43:04 -04:00
parent f7c9e258ae
commit 3d27a6a391
2 changed files with 4 additions and 15 deletions

View File

@ -36,22 +36,10 @@ bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args)
// If only two arguments are given, the pre-1.8 version of the // If only two arguments are given, the pre-1.8 version of the
// command is being invoked. // command is being invoked.
if(args.size() == 2 && args[1] != "FILES") if(args.size() == 2 && args[1] != "FILES")
{
const char* versionValue =
m_Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
if(atof(versionValue) > 1.6)
{
this->SetError("no longer accepts a two-argument form. Use the "
"REGULAR_EXPRESSION argument form instead, or set "
"CMAKE_BACKWARDS_COMPATIBILITY to 1.6 or less.\n");
return false;
}
else
{ {
sg->SetGroupRegex(args[1].c_str()); sg->SetGroupRegex(args[1].c_str());
return true; return true;
} }
}
// Process arguments. // Process arguments.
bool doingFiles = false; bool doingFiles = false;

View File

@ -78,7 +78,8 @@ public:
"be placed in this group. If a file matches multiple groups, the LAST " "be placed in this group. If a file matches multiple groups, the LAST "
"group that explicitly lists the file will be favored, if any. If no " "group that explicitly lists the file will be favored, if any. If no "
"group explicitly lists the file, the LAST group whose regular " "group explicitly lists the file, the LAST group whose regular "
"expression matches the file will be favored."; "expression matches the file will be favored. For backwards compatibility,"
"this command is also supports the format SOURCE_GROUP(name regex).";
} }
cmTypeMacro(cmSourceGroupCommand, cmCommand); cmTypeMacro(cmSourceGroupCommand, cmCommand);