diff options
author | Brad King <brad.king@kitware.com> | 2021-05-13 14:08:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-13 16:48:22 (GMT) |
commit | d346805e419b213230e4ff24d8be0100bee7168d (patch) | |
tree | fdf3668b88783388e9aa1b022c8c93f41dac03d8 /Source/cmLocalCommonGenerator.h | |
parent | 15fa3200715869d5acb94a282feb301d2e10a0eb (diff) | |
download | CMake-d346805e419b213230e4ff24d8be0100bee7168d.zip CMake-d346805e419b213230e4ff24d8be0100bee7168d.tar.gz CMake-d346805e419b213230e4ff24d8be0100bee7168d.tar.bz2 |
cmLocalCommonGenerator: Select work directory semantically
Diffstat (limited to 'Source/cmLocalCommonGenerator.h')
-rw-r--r-- | Source/cmLocalCommonGenerator.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h index 72c8e83..0505c13 100644 --- a/Source/cmLocalCommonGenerator.h +++ b/Source/cmLocalCommonGenerator.h @@ -20,9 +20,15 @@ class cmSourceFile; */ class cmLocalCommonGenerator : public cmLocalGenerator { +protected: + enum class WorkDir + { + TopBin, + CurBin, + }; + public: - cmLocalCommonGenerator(cmGlobalGenerator* gg, cmMakefile* mf, - std::string wd); + cmLocalCommonGenerator(cmGlobalGenerator* gg, cmMakefile* mf, WorkDir wd); ~cmLocalCommonGenerator() override; std::vector<std::string> const& GetConfigNames() const @@ -30,7 +36,7 @@ public: return this->ConfigNames; } - std::string GetWorkingDirectory() const { return this->WorkingDirectory; } + std::string const& GetWorkingDirectory() const; std::string MaybeRelativeToWorkDir(std::string const& path) const; @@ -42,7 +48,7 @@ public: cmGeneratorTarget const* gt = nullptr) override; protected: - std::string WorkingDirectory; + WorkDir WorkingDirectory; std::vector<std::string> ConfigNames; |