summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r--Source/cmGlobalNinjaGenerator.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index d204a50..292f7c7 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -220,6 +220,19 @@ public:
cmGeneratedFileStream* GetRulesFileStream() const {
return this->RulesFileStream; }
+ std::string ConvertToNinjaPath(const std::string& path);
+
+ struct MapToNinjaPathImpl {
+ cmGlobalNinjaGenerator* GG;
+ MapToNinjaPathImpl(cmGlobalNinjaGenerator* gg): GG(gg) {}
+ std::string operator()(std::string const& path) {
+ return this->GG->ConvertToNinjaPath(path);
+ }
+ };
+ MapToNinjaPathImpl MapToNinjaPath() {
+ return MapToNinjaPathImpl(this);
+ }
+
void AddCXXCompileCommand(const std::string &commandLine,
const std::string &sourceFile);