瀏覽代碼

dprecated

Ken Martin 23 年之前
父節點
當前提交
614ba45234
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Source/cmSourceFilesRemoveCommand.cxx

+ 7 - 0
Source/cmSourceFilesRemoveCommand.cxx

@@ -19,6 +19,13 @@
 // cmSourceFilesRemoveCommand
 bool cmSourceFilesRemoveCommand::InitialPass(std::vector<std::string> const& argsIn)
 {
+  const char* versionValue
+    = m_Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
+  if (versionValue && atof(versionValue) > 1.2)
+    {
+    this->SetError("The SOURCE_FILES_REMOVE command has been deprecated in CMake version 1.4. You should use the REMOVE command instead.\n");
+    return false;
+    }
   if(argsIn.size() < 1 )
     {
     this->SetError("called with incorrect number of arguments");