file: Fix CONFIGURE output relative path

In commit a6fee09484 (file: Add CONFIGURE subcommand, 2020-03-06,
v3.18.0-rc1~584^2) we accidentally treated relative path outputs
with respect to the current working directory.  Treat them with
respect to the current binary directory instead.

Fixes: #20885
This commit is contained in:
Brad King
2020-06-29 09:18:06 -04:00
parent e66fe75792
commit e5f5eeca2f
6 changed files with 10 additions and 3 deletions
+2 -1
View File
@@ -2862,7 +2862,8 @@ bool HandleConfigureCommand(std::vector<std::string> const& args,
// Check for generator expressions
const std::string input = args[4];
std::string outputFile = args[2];
std::string outputFile = cmSystemTools::CollapseFullPath(
args[2], status.GetMakefile().GetCurrentBinaryDirectory());
std::string::size_type pos = input.find_first_of("<>");
if (pos != std::string::npos) {