diff options
author | Tim Blechmann <tim@klingt.org> | 2020-01-14 10:17:50 (GMT) |
---|---|---|
committer | Tim Blechmann <tim@klingt.org> | 2020-01-14 10:20:39 (GMT) |
commit | 22f38c0d6b482e99bb793f64c7701259dcf00bd7 (patch) | |
tree | 9c920e53c23ad1559c345c1705475619bf7cb7b4 /Source/cmAddSubDirectoryCommand.cxx | |
parent | 23e782ce05b5996536eff4c075d4bc36a8d8ba85 (diff) | |
download | CMake-22f38c0d6b482e99bb793f64c7701259dcf00bd7.zip CMake-22f38c0d6b482e99bb793f64c7701259dcf00bd7.tar.gz CMake-22f38c0d6b482e99bb793f64c7701259dcf00bd7.tar.bz2 |
cmake: avoid getcwd in `CollapseFullPath`
`CollapseFullPath` calls getcwd, which is a rather expensive system
call. we can replace it with `GetHomeOutputDirectory()` to save us from
the calling overhead
Diffstat (limited to 'Source/cmAddSubDirectoryCommand.cxx')
-rw-r--r-- | Source/cmAddSubDirectoryCommand.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index 6a1a514..35eabaf 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -53,7 +53,8 @@ bool cmAddSubDirectoryCommand(std::vector<std::string> const& args, status.SetError(error); return false; } - srcPath = cmSystemTools::CollapseFullPath(srcPath); + srcPath = + cmSystemTools::CollapseFullPath(srcPath, mf.GetHomeOutputDirectory()); // Compute the full path to the binary directory. std::string binPath; |