summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-21 13:05:47 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-03-21 13:05:56 (GMT)
commit926501c42ae9d4c17a988412e570a1cf99eee5af (patch)
tree53c5a5d1895b41afeac3da7f7549d14a6c23a025 /Source
parente05dcdf246233fcaefe520846a0b353d13d78463 (diff)
parent1d12853ed3c2b3307714c8556f261df70350a980 (diff)
downloadCMake-926501c42ae9d4c17a988412e570a1cf99eee5af.zip
CMake-926501c42ae9d4c17a988412e570a1cf99eee5af.tar.gz
CMake-926501c42ae9d4c17a988412e570a1cf99eee5af.tar.bz2
Merge topic 'file-REAL_PATH'
1d12853ed3 file(REAL_PATH): Ensure same behavior as get_filename_component(REALPATH) Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !8348
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileCommand.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 00a68a8..45fba8b 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -30,7 +30,6 @@
#include "cmArgumentParser.h"
#include "cmArgumentParserTypes.h"
-#include "cmCMakePath.h"
#include "cmCryptoHash.h"
#include "cmELF.h"
#include "cmExecutionStatus.h"
@@ -1278,9 +1277,9 @@ bool HandleRealPathCommand(std::vector<std::string> const& args,
}
}
- cmCMakePath path(input, cmCMakePath::auto_format);
- path = path.Absolute(*arguments.BaseDirectory).Normal();
- auto realPath = cmSystemTools::GetRealPath(path.GenericString());
+ auto realPath =
+ cmSystemTools::CollapseFullPath(input, *arguments.BaseDirectory);
+ realPath = cmSystemTools::GetRealPath(realPath);
status.GetMakefile().AddDefinition(args[2], realPath);