We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5352b6f commit 94ef299Copy full SHA for 94ef299
src/CLI/CLI.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.Collections.Generic;
3
using System.IO;
4
+using System.Linq;
5
using Mono.Options;
6
7
namespace CppSharp
@@ -188,10 +189,9 @@ static void GetFilesFromPath(string path, List<string> errorMessages)
188
189
}
190
else
191
{
- string[] files = Directory.GetFiles(path);
192
-
193
- foreach (string s in files)
194
- options.HeaderFiles.Add(s);
+ var files = Directory.GetFiles(path).Where(f =>
+ Path.GetExtension(f) == ".h" || Path.GetExtension(f) == ".hpp");
+ options.HeaderFiles.AddRange(files);
195
196
197
catch (Exception)
0 commit comments