From e16f484be1a430278b10391a5c49bb98ce4da5c9 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Thu, 19 Nov 2020 17:11:58 +0000 Subject: [PATCH] Remove artificial limitations for cross-generation in CLI. --- src/CLI/Generator.cs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/CLI/Generator.cs b/src/CLI/Generator.cs index 7573acd4..6552b43b 100644 --- a/src/CLI/Generator.cs +++ b/src/CLI/Generator.cs @@ -103,37 +103,8 @@ namespace CppSharp if (string.IsNullOrEmpty(options.OutputNamespace)) options.OutputNamespace = moduleName; - if (Platform.IsWindows && options.Platform != TargetPlatform.Windows) - { - messages.Add("Cannot create bindings for a platform other that Windows from a Windows host."); - return false; - } - else if (Platform.IsMacOS && options.Platform != TargetPlatform.MacOS) - { - messages.Add("Cannot create bindings for a platform other that macOS from a macOS host."); - return false; - } - else if (Platform.IsLinux && options.Platform != TargetPlatform.Linux) - { - messages.Add("Cannot create bindings for a platform other that Linux from a Linux host."); - return false; - } - - if (options.Platform != TargetPlatform.Windows && options.Kind != GeneratorKind.CSharp) - { - messages.Add("Cannot create bindings for languages other than C# from a non-Windows host."); - return false; - } - - if (options.Platform == TargetPlatform.Linux && options.Architecture != TargetArchitecture.x64) - { - messages.Add("Cannot create bindings for architectures other than x64 for Linux targets."); - return false; - } - SetupTargetTriple(); - return true; }