diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-29 15:07:52 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-05-02 15:47:04 (GMT) |
commit | 24a3e5cda049138ca178216e0d7b02262e4035ed (patch) | |
tree | 5f2cd683d0b435959043f67f924683dc91ba82b4 /Source/cmLocalNinjaGenerator.cxx | |
parent | 2488d6dbf7481087fa9ee4a0c77c5e3b0a503387 (diff) | |
download | CMake-24a3e5cda049138ca178216e0d7b02262e4035ed.zip CMake-24a3e5cda049138ca178216e0d7b02262e4035ed.tar.gz CMake-24a3e5cda049138ca178216e0d7b02262e4035ed.tar.bz2 |
cmLocalGenerator::MayBeRelativeToWorkDir: take care of all cases
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index a047233..2e837bb 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -41,7 +41,7 @@ cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf) - : cmLocalCommonGenerator(gg, mf, WorkDir::TopBin) + : cmLocalCommonGenerator(gg, mf) { } @@ -188,6 +188,18 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() return static_cast<cmGlobalNinjaGenerator*>(this->GetGlobalGenerator()); } +std::string const& cmLocalNinjaGenerator::GetWorkingDirectory() const +{ + return this->GetState()->GetBinaryDirectory(); +} + +std::string cmLocalNinjaGenerator::MaybeRelativeToWorkDir( + std::string const& path) const +{ + return this->GetGlobalNinjaGenerator()->NinjaOutputPath( + this->MaybeRelativeToTopBinDir(path)); +} + // Virtual protected methods. std::string cmLocalNinjaGenerator::ConvertToIncludeReference( |