private string GetIncludePath(TranslationUnit translationUnit) { if (!DriverOptions.UseHeaderDirectories && DriverOptions.GenerateName != null) { var extension = Path.GetExtension(TranslationUnit.FileName); return($"{DriverOptions.GenerateName(translationUnit)}{extension}"); } return(translationUnit.FileName); }
public static string GetIncludePath(this DriverOptions driverOptions, TranslationUnit translationUnit) { if (driverOptions.GenerateName != null) { var extension = Path.GetExtension(translationUnit.FileName); return($"{driverOptions.GenerateName(translationUnit)}{extension}"); } else if (driverOptions.UseHeaderDirectories) { var path = Path.Combine(translationUnit.FileRelativeDirectory, translationUnit.FileName); return(path); } return(translationUnit.FileName); }
private string GetIncludePath(TranslationUnit translationUnit) { if (!DriverOptions.UseHeaderDirectories && DriverOptions.GenerateName != null) { var extension = Path.GetExtension(TranslationUnit.FileName); return($"{DriverOptions.GenerateName(translationUnit)}{extension}"); } return(translationUnit.FileName); var rel = PathHelpers.GetRelativePath( TranslationUnit.FileRelativeDirectory, translationUnit.FileRelativeDirectory); if (string.IsNullOrEmpty(rel)) { return(translationUnit.FileName); } return(Path.Combine(rel, translationUnit.FileName)); }