diff options
author | Brad King <brad.king@kitware.com> | 2018-11-15 15:40:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-11-15 15:40:33 (GMT) |
commit | 20aab1a4e7e42ac400a34143403a00c0ac0ec947 (patch) | |
tree | e01efd6947763c461fc1de40e558661cbc1a577a /Source | |
parent | 59fc717c252fb6613b35ff3a7d2cf01e91ab6a69 (diff) | |
parent | 6199637e9540627b03d9018ff53a14f005274607 (diff) | |
download | CMake-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.cxx | 14 |
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)) { |