summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGetFilenameComponentCommand.cxx3
-rw-r--r--Tests/CMakeTests/CMakeLists.txt1
2 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx
index d06efe8..81d019b 100644
--- a/Source/cmGetFilenameComponentCommand.cxx
+++ b/Source/cmGetFilenameComponentCommand.cxx
@@ -91,7 +91,8 @@ bool cmGetFilenameComponentCommand
}
// Collapse the path to its simplest form.
- result = cmSystemTools::CollapseFullPath(filename.c_str());
+ filename = cmSystemTools::CollapseFullPath(filename.c_str());
+ result = cmSystemTools::GetRealPath(filename.c_str());
}
else
{
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index 9f91abc..981653d 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -14,6 +14,7 @@ AddCMakeTest(VariableWatch "")
AddCMakeTest(Include "")
AddCMakeTest(FindBase "")
AddCMakeTest(Toolchain "")
+AddCMakeTest(GetFilenameComponentSymlinks "")
SET(GetPrerequisites_PreArgs
"-DCTEST_CONFIGURATION_TYPE:STRING=\\\${CTEST_CONFIGURATION_TYPE}"