Browse Source

Removed non generated headers from includes collected.

pull/228/merge
marcos henrich 11 years ago committed by triton
parent
commit
94eda74596
  1. 9
      src/Generator/Generators/CLI/CLITypeReferences.cs
  2. 9
      src/Generator/Options.cs

9
src/Generator/Generators/CLI/CLITypeReferences.cs

@ -113,9 +113,9 @@ namespace CppSharp.Generators.CLI @@ -113,9 +113,9 @@ namespace CppSharp.Generators.CLI
var translationUnit = decl.Namespace.TranslationUnit;
if (translationUnit.IsSystemHeader)
return;
if(!decl.IsDeclared)
return;
if (!decl.IsGenerated)
return;
if(IsBuiltinTypedef(decl))
@ -139,9 +139,6 @@ namespace CppSharp.Generators.CLI @@ -139,9 +139,6 @@ namespace CppSharp.Generators.CLI
private string GetIncludePath(TranslationUnit translationUnit)
{
if (!translationUnit.IsGenerated)
return DriverOptions.NoGenIncludePrefix + translationUnit.FileRelativePath;
if (!DriverOptions.UseHeaderDirectories)
return translationUnit.FileName;

9
src/Generator/Options.cs

@ -112,15 +112,14 @@ namespace CppSharp @@ -112,15 +112,14 @@ namespace CppSharp
/// </summary>
public bool GeneratePropertiesAdvanced;
//List of include directories that are used but not generated
public List<string> NoGenIncludeDirs;
public string NoGenIncludePrefix = "";
//List of include directories that are used but not generated
public List<string> NoGenIncludeDirs;
/// <summary>
/// Wether the generated C# code should be automatically compiled.
/// </summary>
public bool CompileCode;
/// <summary>
/// Enable this option to enable generation of finalizers.
/// Works in both CLI and C# backends.

Loading…
Cancel
Save