Merge topic 'restore-cwd-translation-map' into release-3.18

85a945a607 Restore handling of build directory inside a symlinked path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4963
This commit is contained in:
Brad King
2020-07-03 11:25:25 +00:00
committed by Kitware Robot
9 changed files with 62 additions and 1 deletions
+1 -1
View File
@@ -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",
+6
View File
@@ -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)
{
+3
View File
@@ -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);