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/cmOutputConverter.h | |
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/cmOutputConverter.h')
-rw-r--r-- | Source/cmOutputConverter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 2717bdd..625d897 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -16,6 +16,7 @@ class cmOutputConverter { public: cmOutputConverter(cmStateSnapshot const& snapshot); + virtual ~cmOutputConverter() = default; /** * Convert the given remote path to a relative path with respect to @@ -27,6 +28,15 @@ public: std::string MaybeRelativeToTopBinDir(std::string const& path) const; std::string MaybeRelativeToCurBinDir(std::string const& path) const; + /** + * The effective working directory can be different for each generator. + * By default, equivalent to the current binary directory. + */ + virtual std::string MaybeRelativeToWorkDir(std::string const& path) const + { + return this->MaybeRelativeToCurBinDir(path); + } + std::string const& GetRelativePathTopSource() const; std::string const& GetRelativePathTopBinary() const; void SetRelativePathTop(std::string const& topSource, |