mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
774 B
24 lines
774 B
using System.Linq; |
|
|
|
namespace CppSharp.AST |
|
{ |
|
// over time we should turn this into a real class |
|
// like http://llvm.org/docs/doxygen/html/classllvm_1_1Triple.html |
|
public static class TargetTriple |
|
{ |
|
public static bool IsWindows(this string targetTriple) |
|
{ |
|
var parts = targetTriple.Split('-'); |
|
return parts.Contains("windows") || |
|
parts.Contains("win32") || parts.Contains("win64") || |
|
parts.Any(p => p.StartsWith("mingw")); |
|
} |
|
|
|
public static bool IsMacOS(this string targetTriple) |
|
{ |
|
var parts = targetTriple.Split('-'); |
|
return parts.Contains("apple") || |
|
parts.Contains("darwin") || parts.Contains("osx"); |
|
} |
|
} |
|
}
|
|
|