summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-02 10:49:52 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-02 11:33:16 (GMT)
commit85a945a607d5c417e780afed98868366fcfd8fae (patch)
treefd2b1a77f314c6cd0f953d1bc54abcad83062526 /Source/cmSystemTools.h
parent1e26c84b96c0ec6887de2cf5e14061ccb83bdbfe (diff)
downloadCMake-85a945a607d5c417e780afed98868366fcfd8fae.zip
CMake-85a945a607d5c417e780afed98868366fcfd8fae.tar.gz
CMake-85a945a607d5c417e780afed98868366fcfd8fae.tar.bz2
Restore handling of build directory inside a symlinked path
In commit dd8365b3f1 (Merge branch 'upstream-KWSys' into update-kwsys, 2020-04-06, v3.18.0-rc1~397^2) we imported KWSys commit `019afb6ea` (SystemTools: Drop GetCurrentWorkingDirectory 'collapse' argument, 2020-04-03). That caused `GetCurrentWorkingDirectory` to no longer send paths through the KWSys translation map and broke CMake's detection of the absolute path to a build directory containing a symbolic link. Add our own `cmSystemTools::GetCurrentWorkingDirectory` wrapper around the KWSys method in order to restore that mapping. Test-case-by: Ben Boeckel <ben.boeckel@kitware.com> Issue: #16228 Fixes: #20900
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index ee149a0..b886c58 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -390,6 +390,9 @@ public:
static std::string const& GetCMClDepsCommand();
static std::string const& GetCMakeRoot();
+ /** Get the CWD mapped through the KWSys translation map. */
+ static std::string GetCurrentWorkingDirectory();
+
/** Echo a message in color using KWSys's Terminal cprintf. */
static void MakefileColorEcho(int color, const char* message, bool newLine,
bool enabled);