diff options
author | Brad King <brad.king@kitware.com> | 2018-11-19 15:12:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-11-19 15:14:26 (GMT) |
commit | e593161bd5952f7e24e88a368cc0b39c9a2ca795 (patch) | |
tree | b7b5d8df1e4deb6ef403b72f227335b24223b292 /Source | |
parent | d68409047048f99d28129a60c44a302c8b5e0b8f (diff) | |
parent | 57701227d68d7add76c119a570adf654af03de95 (diff) | |
download | CMake-e593161bd5952f7e24e88a368cc0b39c9a2ca795.zip CMake-e593161bd5952f7e24e88a368cc0b39c9a2ca795.tar.gz CMake-e593161bd5952f7e24e88a368cc0b39c9a2ca795.tar.bz2 |
Merge branch 'backport-configure_file-canonical-deps' into release-3.13
Merge-request: !2635
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)) { |