ENH: Added support for spaces in the output directory names. Spaces in the input directory name may work also, but are untested.
This commit is contained in:
parent
70b14df3f0
commit
e7bd5fcd19
|
@ -81,29 +81,33 @@ void cmCableCommand::SetupCableData()
|
||||||
|
|
||||||
// We must add a custom rule to cause the cable_config.xml to be re-built
|
// We must add a custom rule to cause the cable_config.xml to be re-built
|
||||||
// when it is removed. Rebuilding it means re-running CMake.
|
// when it is removed. Rebuilding it means re-running CMake.
|
||||||
std::string cMakeLists = m_Makefile->GetStartDirectory();
|
std::string cMakeLists = "\"";
|
||||||
|
cMakeLists += m_Makefile->GetStartDirectory();
|
||||||
cMakeLists += "/";
|
cMakeLists += "/";
|
||||||
cMakeLists += "CMakeLists.txt";
|
cMakeLists += "CMakeLists.txt\"";
|
||||||
|
|
||||||
std::string command;
|
std::string command;
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
command = m_Makefile->GetHomeDirectory();
|
command = "\"";
|
||||||
command += "/CMake/Source/CMakeSetupCMD ";
|
command += m_Makefile->GetHomeDirectory();
|
||||||
|
command += "/CMake/Source/CMakeSetupCMD\" ";
|
||||||
command += cMakeLists;
|
command += cMakeLists;
|
||||||
command += " -DSP";
|
command += " -DSP";
|
||||||
#else
|
#else
|
||||||
command = m_Makefile->GetHomeOutputDirectory();
|
command = "\"";
|
||||||
command += "/CMake/Source/CMakeBuildTargets ";
|
command += m_Makefile->GetHomeOutputDirectory();
|
||||||
|
command += "/CMake/Source/CMakeBuildTargets\" ";
|
||||||
command += cMakeLists;
|
command += cMakeLists;
|
||||||
#endif
|
#endif
|
||||||
command += " -H";
|
command += " -H\"";
|
||||||
command += m_Makefile->GetHomeDirectory();
|
command += m_Makefile->GetHomeDirectory();
|
||||||
command += " -S";
|
command += "\" -S\"";
|
||||||
command += m_Makefile->GetStartDirectory();
|
command += m_Makefile->GetStartDirectory();
|
||||||
command += " -O";
|
command += "\" -O\"";
|
||||||
command += m_Makefile->GetStartOutputDirectory();
|
command += m_Makefile->GetStartOutputDirectory();
|
||||||
command += " -B";
|
command += "\" -B\"";
|
||||||
command += m_Makefile->GetHomeOutputDirectory();
|
command += m_Makefile->GetHomeOutputDirectory();
|
||||||
|
command += "\"";
|
||||||
|
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
m_Makefile->AddCustomCommand(cMakeLists.c_str(),
|
m_Makefile->AddCustomCommand(cMakeLists.c_str(),
|
||||||
|
|
|
@ -157,20 +157,23 @@ void cmDSPMakefile::WriteDSPBuildRule(std::ostream& fout)
|
||||||
{
|
{
|
||||||
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
||||||
dspname += ".dsp";
|
dspname += ".dsp";
|
||||||
std::string makefileIn = m_Makefile->GetStartDirectory();
|
std::string makefileIn = "\"";
|
||||||
|
makefileIn += m_Makefile->GetStartDirectory();
|
||||||
makefileIn += "/";
|
makefileIn += "/";
|
||||||
makefileIn += "CMakeLists.txt";
|
makefileIn += "CMakeLists.txt\"";
|
||||||
std::string dsprule = m_Makefile->GetHomeDirectory();
|
std::string dsprule = "\"";
|
||||||
dsprule += "/CMake/Source/CMakeSetupCMD ";
|
|
||||||
dsprule += makefileIn;
|
|
||||||
dsprule += " -DSP -H";
|
|
||||||
dsprule += m_Makefile->GetHomeDirectory();
|
dsprule += m_Makefile->GetHomeDirectory();
|
||||||
dsprule += " -S";
|
dsprule += "/CMake/Source/CMakeSetupCMD\" ";
|
||||||
|
dsprule += makefileIn;
|
||||||
|
dsprule += " -DSP -H\"";
|
||||||
|
dsprule += m_Makefile->GetHomeDirectory();
|
||||||
|
dsprule += "\" -S\"";
|
||||||
dsprule += m_Makefile->GetStartDirectory();
|
dsprule += m_Makefile->GetStartDirectory();
|
||||||
dsprule += " -O";
|
dsprule += "\" -O\"";
|
||||||
dsprule += m_Makefile->GetStartOutputDirectory();
|
dsprule += m_Makefile->GetStartOutputDirectory();
|
||||||
dsprule += " -B";
|
dsprule += "\" -B\"";
|
||||||
dsprule += m_Makefile->GetHomeOutputDirectory();
|
dsprule += m_Makefile->GetHomeOutputDirectory();
|
||||||
|
dsprule += "\"";
|
||||||
|
|
||||||
std::set<std::string> depends;
|
std::set<std::string> depends;
|
||||||
std::set<std::string> outputs;
|
std::set<std::string> outputs;
|
||||||
|
@ -186,20 +189,23 @@ void cmDSPMakefile::AddDSPBuildRule(cmSourceGroup& sourceGroup)
|
||||||
{
|
{
|
||||||
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
||||||
dspname += ".dsp";
|
dspname += ".dsp";
|
||||||
std::string makefileIn = m_Makefile->GetStartDirectory();
|
std::string makefileIn = "\"";
|
||||||
|
makefileIn += m_Makefile->GetStartDirectory();
|
||||||
makefileIn += "/";
|
makefileIn += "/";
|
||||||
makefileIn += "CMakeLists.txt";
|
makefileIn += "CMakeLists.txt\"";
|
||||||
std::string dsprule = m_Makefile->GetHomeDirectory();
|
std::string dsprule = "\"";
|
||||||
dsprule += "/CMake/Source/CMakeSetupCMD ";
|
|
||||||
dsprule += makefileIn;
|
|
||||||
dsprule += " -DSP -H";
|
|
||||||
dsprule += m_Makefile->GetHomeDirectory();
|
dsprule += m_Makefile->GetHomeDirectory();
|
||||||
dsprule += " -S";
|
dsprule += "/CMake/Source/CMakeSetupCMD\" ";
|
||||||
|
dsprule += makefileIn;
|
||||||
|
dsprule += " -DSP -H\"";
|
||||||
|
dsprule += m_Makefile->GetHomeDirectory();
|
||||||
|
dsprule += "\" -S\"";
|
||||||
dsprule += m_Makefile->GetStartDirectory();
|
dsprule += m_Makefile->GetStartDirectory();
|
||||||
dsprule += " -O";
|
dsprule += "\" -O\"";
|
||||||
dsprule += m_Makefile->GetStartOutputDirectory();
|
dsprule += m_Makefile->GetStartOutputDirectory();
|
||||||
dsprule += " -B";
|
dsprule += "\" -B\"";
|
||||||
dsprule += m_Makefile->GetHomeOutputDirectory();
|
dsprule += m_Makefile->GetHomeOutputDirectory();
|
||||||
|
dsprule += "\"";
|
||||||
|
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
std::vector<std::string> outputs;
|
std::vector<std::string> outputs;
|
||||||
|
@ -316,7 +322,7 @@ void cmDSPMakefile::WriteCustomRule(std::ostream& fout,
|
||||||
for(std::set<std::string>::const_iterator d = depends.begin();
|
for(std::set<std::string>::const_iterator d = depends.begin();
|
||||||
d != depends.end(); ++d)
|
d != depends.end(); ++d)
|
||||||
{
|
{
|
||||||
fout << " \"" << d->c_str() << "\"";
|
fout << " " << d->c_str();
|
||||||
}
|
}
|
||||||
fout << "\n " << command << "\n\n";
|
fout << "\n " << command << "\n\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,20 +157,23 @@ void cmDSPMakefile::WriteDSPBuildRule(std::ostream& fout)
|
||||||
{
|
{
|
||||||
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
||||||
dspname += ".dsp";
|
dspname += ".dsp";
|
||||||
std::string makefileIn = m_Makefile->GetStartDirectory();
|
std::string makefileIn = "\"";
|
||||||
|
makefileIn += m_Makefile->GetStartDirectory();
|
||||||
makefileIn += "/";
|
makefileIn += "/";
|
||||||
makefileIn += "CMakeLists.txt";
|
makefileIn += "CMakeLists.txt\"";
|
||||||
std::string dsprule = m_Makefile->GetHomeDirectory();
|
std::string dsprule = "\"";
|
||||||
dsprule += "/CMake/Source/CMakeSetupCMD ";
|
|
||||||
dsprule += makefileIn;
|
|
||||||
dsprule += " -DSP -H";
|
|
||||||
dsprule += m_Makefile->GetHomeDirectory();
|
dsprule += m_Makefile->GetHomeDirectory();
|
||||||
dsprule += " -S";
|
dsprule += "/CMake/Source/CMakeSetupCMD\" ";
|
||||||
|
dsprule += makefileIn;
|
||||||
|
dsprule += " -DSP -H\"";
|
||||||
|
dsprule += m_Makefile->GetHomeDirectory();
|
||||||
|
dsprule += "\" -S\"";
|
||||||
dsprule += m_Makefile->GetStartDirectory();
|
dsprule += m_Makefile->GetStartDirectory();
|
||||||
dsprule += " -O";
|
dsprule += "\" -O\"";
|
||||||
dsprule += m_Makefile->GetStartOutputDirectory();
|
dsprule += m_Makefile->GetStartOutputDirectory();
|
||||||
dsprule += " -B";
|
dsprule += "\" -B\"";
|
||||||
dsprule += m_Makefile->GetHomeOutputDirectory();
|
dsprule += m_Makefile->GetHomeOutputDirectory();
|
||||||
|
dsprule += "\"";
|
||||||
|
|
||||||
std::set<std::string> depends;
|
std::set<std::string> depends;
|
||||||
std::set<std::string> outputs;
|
std::set<std::string> outputs;
|
||||||
|
@ -186,20 +189,23 @@ void cmDSPMakefile::AddDSPBuildRule(cmSourceGroup& sourceGroup)
|
||||||
{
|
{
|
||||||
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
std::string dspname = *(m_CreatedProjectNames.end()-1);
|
||||||
dspname += ".dsp";
|
dspname += ".dsp";
|
||||||
std::string makefileIn = m_Makefile->GetStartDirectory();
|
std::string makefileIn = "\"";
|
||||||
|
makefileIn += m_Makefile->GetStartDirectory();
|
||||||
makefileIn += "/";
|
makefileIn += "/";
|
||||||
makefileIn += "CMakeLists.txt";
|
makefileIn += "CMakeLists.txt\"";
|
||||||
std::string dsprule = m_Makefile->GetHomeDirectory();
|
std::string dsprule = "\"";
|
||||||
dsprule += "/CMake/Source/CMakeSetupCMD ";
|
|
||||||
dsprule += makefileIn;
|
|
||||||
dsprule += " -DSP -H";
|
|
||||||
dsprule += m_Makefile->GetHomeDirectory();
|
dsprule += m_Makefile->GetHomeDirectory();
|
||||||
dsprule += " -S";
|
dsprule += "/CMake/Source/CMakeSetupCMD\" ";
|
||||||
|
dsprule += makefileIn;
|
||||||
|
dsprule += " -DSP -H\"";
|
||||||
|
dsprule += m_Makefile->GetHomeDirectory();
|
||||||
|
dsprule += "\" -S\"";
|
||||||
dsprule += m_Makefile->GetStartDirectory();
|
dsprule += m_Makefile->GetStartDirectory();
|
||||||
dsprule += " -O";
|
dsprule += "\" -O\"";
|
||||||
dsprule += m_Makefile->GetStartOutputDirectory();
|
dsprule += m_Makefile->GetStartOutputDirectory();
|
||||||
dsprule += " -B";
|
dsprule += "\" -B\"";
|
||||||
dsprule += m_Makefile->GetHomeOutputDirectory();
|
dsprule += m_Makefile->GetHomeOutputDirectory();
|
||||||
|
dsprule += "\"";
|
||||||
|
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
std::vector<std::string> outputs;
|
std::vector<std::string> outputs;
|
||||||
|
@ -316,7 +322,7 @@ void cmDSPMakefile::WriteCustomRule(std::ostream& fout,
|
||||||
for(std::set<std::string>::const_iterator d = depends.begin();
|
for(std::set<std::string>::const_iterator d = depends.begin();
|
||||||
d != depends.end(); ++d)
|
d != depends.end(); ++d)
|
||||||
{
|
{
|
||||||
fout << " \"" << d->c_str() << "\"";
|
fout << " " << d->c_str();
|
||||||
}
|
}
|
||||||
fout << "\n " << command << "\n\n";
|
fout << "\n " << command << "\n\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,8 +70,8 @@ bool cmUtilitySourceCommand::Invoke(std::vector<std::string>& args)
|
||||||
|
|
||||||
// Construct the cache entry for the executable's location.
|
// Construct the cache entry for the executable's location.
|
||||||
std::string utilityExecutable =
|
std::string utilityExecutable =
|
||||||
utilityDirectory+"/"+cmakeCFGout+"/"
|
"\""+utilityDirectory+"/"+cmakeCFGout+"/"
|
||||||
+utilityName+cmSystemTools::GetExecutableExtension();
|
+utilityName+cmSystemTools::GetExecutableExtension()+"\"";
|
||||||
|
|
||||||
// Enter the value into the cache.
|
// Enter the value into the cache.
|
||||||
cmCacheManager::GetInstance()->AddCacheEntry(cacheEntry.c_str(),
|
cmCacheManager::GetInstance()->AddCacheEntry(cacheEntry.c_str(),
|
||||||
|
|
Loading…
Reference in New Issue