summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-15 15:40:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-11-15 15:40:33 (GMT)
commit20aab1a4e7e42ac400a34143403a00c0ac0ec947 (patch)
treee01efd6947763c461fc1de40e558661cbc1a577a /Source
parent59fc717c252fb6613b35ff3a7d2cf01e91ab6a69 (diff)
parent6199637e9540627b03d9018ff53a14f005274607 (diff)
downloadCMake-20aab1a4e7e42ac400a34143403a00c0ac0ec947.zip
CMake-20aab1a4e7e42ac400a34143403a00c0ac0ec947.tar.gz
CMake-20aab1a4e7e42ac400a34143403a00c0ac0ec947.tar.bz2
Merge topic 'configure_file-canonical-deps'
6199637e95 configure_file: canonicalize input and output path in dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2586
Diffstat (limited to 'Source')
-rw-r--r--Source/cmConfigureFileCommand.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx
index b5a639a..305262d 100644
--- a/Source/cmConfigureFileCommand.cxx
+++ b/Source/cmConfigureFileCommand.cxx
@@ -20,11 +20,8 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args,
}
std::string const& inFile = args[0];
- if (!cmSystemTools::FileIsFullPath(inFile)) {
- this->InputFile = this->Makefile->GetCurrentSourceDirectory();
- this->InputFile += "/";
- }
- this->InputFile += inFile;
+ this->InputFile = cmSystemTools::CollapseFullPath(
+ inFile, this->Makefile->GetCurrentSourceDirectory());
// If the input location is a directory, error out.
if (cmSystemTools::FileIsDirectory(this->InputFile)) {
@@ -39,11 +36,8 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args,
}
std::string const& outFile = args[1];
- if (!cmSystemTools::FileIsFullPath(outFile)) {
- this->OutputFile = this->Makefile->GetCurrentBinaryDirectory();
- this->OutputFile += "/";
- }
- this->OutputFile += outFile;
+ this->OutputFile = cmSystemTools::CollapseFullPath(
+ outFile, this->Makefile->GetCurrentBinaryDirectory());
// If the output location is already a directory put the file in it.
if (cmSystemTools::FileIsDirectory(this->OutputFile)) {