summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-03 11:25:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-07-03 11:25:31 (GMT)
commit977f5ed3d101d200baf5e88832b25d2c3edd1475 (patch)
treea2ee9601f6ed37098224dd2f05ec043afdc31b25 /Source
parentbfa645c5992fa111b2ac90c5b7994c6aac8f7764 (diff)
parent85a945a607d5c417e780afed98868366fcfd8fae (diff)
downloadCMake-977f5ed3d101d200baf5e88832b25d2c3edd1475.zip
CMake-977f5ed3d101d200baf5e88832b25d2c3edd1475.tar.gz
CMake-977f5ed3d101d200baf5e88832b25d2c3edd1475.tar.bz2
Merge topic 'restore-cwd-translation-map'
85a945a607 Restore handling of build directory inside a symlinked path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4963
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cpack.cxx2
-rw-r--r--Source/cmSystemTools.cxx6
-rw-r--r--Source/cmSystemTools.h3
3 files changed, 10 insertions, 1 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 2e5bde2..3a400b7 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -312,7 +312,7 @@ int main(int argc, char const* const* argv)
// The value has not been set on the command line
else {
// get a default value (current working directory)
- cpackProjectDirectory = cmsys::SystemTools::GetCurrentWorkingDirectory();
+ cpackProjectDirectory = cmSystemTools::GetCurrentWorkingDirectory();
// use default value if no value has been provided by the config file
if (!globalMF.IsSet("CPACK_PACKAGE_DIRECTORY")) {
globalMF.AddDefinition("CPACK_PACKAGE_DIRECTORY",
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 2f08b84..1e78d36 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2082,6 +2082,12 @@ std::string const& cmSystemTools::GetCMakeRoot()
return cmSystemToolsCMakeRoot;
}
+std::string cmSystemTools::GetCurrentWorkingDirectory()
+{
+ return cmSystemTools::CollapseFullPath(
+ cmsys::SystemTools::GetCurrentWorkingDirectory());
+}
+
void cmSystemTools::MakefileColorEcho(int color, const char* message,
bool newline, bool enabled)
{
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);