瀏覽代碼

Allow target with no command

Andy Cedilnik 23 年之前
父節點
當前提交
ab64db6ee8
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      Source/cmAddCustomTargetCommand.cxx
  2. 2 2
      Source/cmAddCustomTargetCommand.h

+ 1 - 1
Source/cmAddCustomTargetCommand.cxx

@@ -33,7 +33,7 @@ bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string> const& argsI
   std::string arguments;
   std::vector<std::string>::const_iterator s = args.begin();
   ++s; // move past args[0] as it is already to be used
-  if (args.size() >= 3)
+  if (args.size() >= 2)
     {
     if (args[1] == "ALL")
       {

+ 2 - 2
Source/cmAddCustomTargetCommand.h

@@ -66,8 +66,8 @@ public:
   virtual const char* GetFullDocumentation()
     {
     return
-      "ADD_CUSTOM_TARGET(Name [ALL] command arg arg arg ...)\n"
-      "The ALL option is optional. If it is specified it indicates that this target should be added to the Build all target.";
+      "ADD_CUSTOM_TARGET(Name [ALL] [ command arg arg arg ... ])\n"
+      "The ALL option is optional. If it is specified it indicates that this target should be added to the Build all target. The command and arguments are optional. If not specified, it will create an empy target. Command cannot be called ALL.";
     }
   
   cmTypeMacro(cmAddCustomTargetCommand, cmCommand);