1
0
Эх сурвалжийг харах

ENH: Added use of CMAKE cache entry for generating the DSP/makefile build rules.

Brad King 24 жил өмнө
parent
commit
6c54371c8f

+ 4 - 14
Source/cmCablePackageCommand.cxx

@@ -76,22 +76,11 @@ bool cmCablePackageCommand::Invoke(std::vector<std::string>& args)
   std::string cMakeLists = m_Makefile->GetStartDirectory();
   std::string cMakeLists = m_Makefile->GetStartDirectory();
   cMakeLists += "/";
   cMakeLists += "/";
   cMakeLists += "CMakeLists.txt";
   cMakeLists += "CMakeLists.txt";
+  cMakeLists = cmSystemTools::EscapeSpaces(cMakeLists.c_str());
 
 
-  std::string command;
+  std::string command = "${CMAKE} "+cMakeLists;
 #if defined(_WIN32) && !defined(__CYGWIN__)
 #if defined(_WIN32) && !defined(__CYGWIN__)
-  cMakeLists = "\""+cMakeLists+"\"";
-  command = "\"";
-  command += m_Makefile->GetHomeDirectory();
-  command += "/CMake/Source/CMakeSetupCMD\" \"";
-  command += cMakeLists;
-  command += "\" -DSP";
-#else
-  cMakeLists = cmSystemTools::EscapeSpaces(cMakeLists.c_str());
-  command = "\"";
-  command += m_Makefile->GetHomeOutputDirectory();  
-  command += "/CMake/Source/CMakeBuildTargets\" \"";
-  command += cMakeLists;
-  command += "\"";
+  command += " -DSP";
 #endif
 #endif
   command += " -H\"";
   command += " -H\"";
   command += m_Makefile->GetHomeDirectory();
   command += m_Makefile->GetHomeDirectory();
@@ -102,6 +91,7 @@ bool cmCablePackageCommand::Invoke(std::vector<std::string>& args)
   command += "\" -B\"";
   command += "\" -B\"";
   command += m_Makefile->GetHomeOutputDirectory();
   command += m_Makefile->GetHomeOutputDirectory();
   command += "\"";
   command += "\"";
+  m_Makefile->ExpandVariablesInString(command);
 
 
   std::vector<std::string> depends;
   std::vector<std::string> depends;
   m_Makefile->AddCustomCommand(cMakeLists.c_str(), 
   m_Makefile->AddCustomCommand(cMakeLists.c_str(),