summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-02-19 01:50:53 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2012-02-19 04:00:02 (GMT)
commitcea03e632b71589592660614a63ff102ba923de8 (patch)
tree2413c402f5880a595c05ae54e36be230c57497da /Source/cmLocalNinjaGenerator.cxx
parent9362440a0b9193c417b42c50495d0a3ea6e098c4 (diff)
downloadCMake-cea03e632b71589592660614a63ff102ba923de8.zip
CMake-cea03e632b71589592660614a63ff102ba923de8.tar.gz
CMake-cea03e632b71589592660614a63ff102ba923de8.tar.bz2
Ninja: Backslash rules for Windows
Generally these are only required in build statements, as Ninja wants to be able to chop paths up. But it doesn't hurt to also try to use them in command line arguments.
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index cf0e36a..28e8d47 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -28,6 +28,9 @@ cmLocalNinjaGenerator::cmLocalNinjaGenerator()
, HomeRelativeOutputPath("")
{
this->IsMakefileGenerator = true;
+#ifdef _WIN32
+ this->WindowsShell = true;
+#endif
}
//----------------------------------------------------------------------------
@@ -256,9 +259,11 @@ void cmLocalNinjaGenerator::WriteProcessedMakefile(std::ostream& os)
std::string cmLocalNinjaGenerator::ConvertToNinjaPath(const char *path)
{
- return this->Convert(path,
- cmLocalGenerator::HOME_OUTPUT,
- cmLocalGenerator::MAKEFILE);
+ std::string convPath = this->Convert(path, cmLocalGenerator::HOME_OUTPUT);
+#ifdef _WIN32
+ cmSystemTools::ReplaceString(convPath, "/", "\\");
+#endif
+ return convPath;
}
void