cmLocalGenerator: collapse the path after construction

The path may contain `..` or `.` components naïvely, so compute them out
before letting the generator handle them.
This commit is contained in:
Ben Boeckel
2020-01-09 16:40:22 -05:00
parent fd0ba705ce
commit ec479f101f
2 changed files with 3 additions and 0 deletions

View File

@@ -2011,6 +2011,8 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName,
dep = cmStrCat(this->GetCurrentBinaryDirectory(), '/', inName);
}
dep = cmSystemTools::CollapseFullPath(dep, this->GetBinaryDirectory());
return true;
}

View File

@@ -535,6 +535,7 @@ set_property(SOURCE "${gen_file}" PROPERTY SYMBOLIC ON)
add_custom_target(command_expand_lists ALL DEPENDS "${gen_file}")
set_property(TARGET command_expand_lists PROPERTY CMPARGS "${cmp_args}")
# This also tests that `./` is squeezed out of the resulting path.
set(depends_path "./depended_upon_path.txt")
add_custom_command(