Browse Source

Add support for verbose logging in build command

Matt Benic 8 years ago
parent
commit
3a1eb791a5
2 changed files with 12 additions and 3 deletions
  1. 10 2
      Source/ToolCore/Command/BuildCmd.cpp
  2. 2 1
      Source/ToolCore/Command/BuildCmd.h

+ 10 - 2
Source/ToolCore/Command/BuildCmd.cpp

@@ -36,7 +36,10 @@
 namespace ToolCore
 {
 
-BuildCmd::BuildCmd(Context* context) : Command(context)
+BuildCmd::BuildCmd(Context* context) :
+    Command(context),
+    autoLog_(false),
+    verbose_(false)
 {
 
 }
@@ -68,7 +71,7 @@ bool BuildCmd::ParseInternal(const Vector<String>& arguments, unsigned startInde
     for (int i = startIndex + 2; i < arguments.Size(); ++i)
     {
         String option = arguments[i].ToLower();
-        
+
         if (option == "-tag")
         {
             if (arguments.Size() == i + 1)
@@ -81,6 +84,10 @@ bool BuildCmd::ParseInternal(const Vector<String>& arguments, unsigned startInde
         {
             autoLog_ = true;
         }
+        else if (option == "-verbose")
+        {
+            verbose_ = true;
+        }
     }
 
     String tag = startIndex + 2 < arguments.Size() ? arguments[startIndex + 2] : String::EMPTY;
@@ -127,6 +134,7 @@ void BuildCmd::Run()
         buildBase->SetAssetBuildTag(assetsBuildTag_);
     }
     buildBase->SetAutoLog(autoLog_);
+    buildBase->SetVerbose(verbose_);
 
     // add it to the build system
     BuildSystem* buildSystem = GetSubsystem<BuildSystem>();

+ 2 - 1
Source/ToolCore/Command/BuildCmd.h

@@ -47,11 +47,12 @@ protected:
 private:
 
     void HandleBuildComplete(StringHash eventType, VariantMap& eventData);
-    
+
 
     String buildPlatform_;
     String assetsBuildTag_;
     bool autoLog_;
+    bool verbose_;
 
 };