Преглед изворни кода

ENH: Running "make test" can now have ARGS specified on the command line. These ARGS are passed to ctest.

Brad King пре 23 година
родитељ
комит
c9cec2add5
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      Source/cmLocalUnixMakefileGenerator.cxx

+ 4 - 1
Source/cmLocalUnixMakefileGenerator.cxx

@@ -2304,11 +2304,14 @@ void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
     }
   if (cmSystemTools::FileExists(ctest.c_str()))
     {
+    fout << "ARGS=\n";
+    std::string cmd = this->ConvertToOutputForExisting(ctest.c_str());
+    cmd += " $(ARGS)";
     this->OutputMakeRule(fout, 
                          "tests",
                          "test",
                          "",
-                         this->ConvertToOutputForExisting(ctest.c_str()).c_str());
+                         cmd.c_str());
     }
 }