summaryrefslogtreecommitdiffstats
path: root/Source/cmNMakeMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2001-11-20 22:27:41 (GMT)
committerBerk Geveci <berk.geveci@kitware.com>2001-11-20 22:27:41 (GMT)
commitf3d63c1932f5a9d2b159ccddf9acd09f8c5358c2 (patch)
treec044b3dcb7cc736c13e2ffc5c450289e4e0cb9f9 /Source/cmNMakeMakefileGenerator.cxx
parenta43f3c99c7e116e44fd103598cb0a6ee2a4eb1a1 (diff)
downloadCMake-f3d63c1932f5a9d2b159ccddf9acd09f8c5358c2.zip
CMake-f3d63c1932f5a9d2b159ccddf9acd09f8c5358c2.tar.gz
CMake-f3d63c1932f5a9d2b159ccddf9acd09f8c5358c2.tar.bz2
ENH: closer to working with spaces in source directory
Diffstat (limited to 'Source/cmNMakeMakefileGenerator.cxx')
-rw-r--r--Source/cmNMakeMakefileGenerator.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx
index 19ba1de..40b5134 100644
--- a/Source/cmNMakeMakefileGenerator.cxx
+++ b/Source/cmNMakeMakefileGenerator.cxx
@@ -98,18 +98,22 @@ void cmNMakeMakefileGenerator::OutputMakeVariables(std::ostream& fout)
std::string replaceVars = variables;
m_Makefile->ExpandVariablesInString(replaceVars);
fout << replaceVars.c_str();
- fout << "CMAKE_CURRENT_SOURCE = " << m_Makefile->GetStartDirectory()
+ fout << "CMAKE_CURRENT_SOURCE = " <<
+ cmSystemTools::EscapeSpaces(m_Makefile->GetStartDirectory() )
<< "\n";
- fout << "CMAKE_CURRENT_BINARY = " << m_Makefile->GetStartOutputDirectory()
+ fout << "CMAKE_CURRENT_BINARY = "
+ << cmSystemTools::EscapeSpaces(m_Makefile->GetStartOutputDirectory())
<< "\n";
- fout << "CMAKE_SOURCE_DIR = " << m_Makefile->GetHomeDirectory() << "\n";
- fout << "CMAKE_BINARY_DIR = " << m_Makefile->GetHomeOutputDirectory()
+ fout << "CMAKE_SOURCE_DIR = " <<
+ cmSystemTools::EscapeSpaces(m_Makefile->GetHomeDirectory()) << "\n";
+ fout << "CMAKE_BINARY_DIR = " <<
+ cmSystemTools::EscapeSpaces(m_Makefile->GetHomeOutputDirectory() )
<< "\n";
// Output Include paths
fout << "INCLUDE_FLAGS = ";
std::vector<std::string>& includes = m_Makefile->GetIncludeDirectories();
std::vector<std::string>::iterator i;
- fout << "-I" << m_Makefile->GetStartDirectory() << " ";
+ fout << "-I" << cmSystemTools::EscapeSpaces(m_Makefile->GetStartDirectory()) << " ";
for(i = includes.begin(); i != includes.end(); ++i)
{
std::string include = *i;
@@ -179,6 +183,7 @@ void cmNMakeMakefileGenerator::OutputMakeRule(std::ostream& fout,
fout << "\n";
replace = target;
m_Makefile->ExpandVariablesInString(replace);
+ replace = cmSystemTools::EscapeSpaces(replace.c_str());
fout << replace.c_str() << ": ";
if(depends)
{