Browse Source

ENH: expand variables in a command before escaping spaces in the command

Berk Geveci 24 years ago
parent
commit
1944e1887d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Source/cmMakefile.cxx

+ 3 - 1
Source/cmMakefile.cxx

@@ -471,7 +471,9 @@ void cmMakefile::AddCustomCommand(const char* source,
   // find the target, 
   if (m_Targets.find(target) != m_Targets.end())
     {
-    std::string c = cmSystemTools::EscapeSpaces(command);
+    std::string expandC = command;
+    this->ExpandVariablesInString(expandC);
+    std::string c = cmSystemTools::EscapeSpaces(expandC.c_str());
 
     std::string combinedArgs;
     unsigned int i;