mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
FASTBuild: fix relative paths to includes
When include path is the same as binary dir - `cmSystemTools::RelativePath` returns an empty string which results into incorrect compiler option (`-I` without anything afterwards)
This commit is contained in:
@@ -106,6 +106,9 @@ std::string cmLocalFastbuildGenerator::ConvertToIncludeReference(
|
||||
if (GG->UsingRelativePaths && cmSystemTools::FileIsFullPath(path)) {
|
||||
std::string const& binDir =
|
||||
GG->GetCMakeInstance()->GetHomeOutputDirectory();
|
||||
if (binDir == converted) {
|
||||
return ".";
|
||||
}
|
||||
return cmSystemTools::RelativePath(binDir, converted);
|
||||
}
|
||||
return converted;
|
||||
|
||||
Reference in New Issue
Block a user