Salome HOME
Upgrade to new MG license mechanism and keep compatibility with old ones
[modules/smesh.git] / src / SMESH / MG_ADAPT.cxx
index 739394b78da3bbc568a59b59d5f180f5c9f8b25d..82f9221b2f9fa341a9b2a13cdd46008b8e0f7c80 100644 (file)
@@ -1036,14 +1036,19 @@ std::string MgAdapt::getCommandToRun()
     if ( key.empty() )
       return ToComment( "Problem with library SalomeMeshGemsKeyGenerator: " + errorTxt );
 
-    cmd += " --key " + key;
+    if ( key!="0" )
+      cmd += " --key " + key;
   }
 
 #ifdef WIN32
   cmd += " < NUL";
 #endif
-  //   std::cout << "--- cmd :"<< std::endl;
-  //   std::cout << cmd << std::endl;
+
+  if (SALOME::VerbosityActivated())
+    {
+      std::cout << "--- cmd :"<< std::endl;
+      std::cout << cmd << std::endl;
+    }
 
   return cmd;
 }
@@ -1575,9 +1580,9 @@ MgAdapt::Status MgAdapt::addMessage(const std::string& msg,
   _errorMessages.push_back( msg );
 
   //~MESSAGE(msg);
-#ifdef _DEBUG_
-  std::cout << msg << std::endl;
-#endif
+  if (SALOME::VerbosityActivated())
+    std::cout << msg << std::endl;
+
   return ( _status = isFatal ? MgAdapt::DRS_FAIL : MgAdapt::DRS_WARN_SKIP_ELEM );
 }