private static void SetupMacOptions(DriverOptions options) { options.MicrosoftMode = false; options.NoBuiltinIncludes = true; if (IsMacOS) { var headersPaths = new List <string> { Path.Combine(GetSourceDirectory("deps"), "llvm/tools/clang/lib/Headers"), Path.Combine(GetSourceDirectory("deps"), "libcxx", "include"), "/usr/include", }; foreach (var header in headersPaths) { Console.WriteLine(header); } foreach (var header in headersPaths) { options.addSystemIncludeDirs(header); } } var headersPath = Path.Combine(GetSourceDirectory("build"), "headers", "osx"); options.addSystemIncludeDirs(Path.Combine(headersPath, "include")); options.addSystemIncludeDirs(Path.Combine(headersPath, "clang", "4.2", "include")); options.addSystemIncludeDirs(Path.Combine(headersPath, "libcxx", "include")); options.addArguments("-stdlib=libc++"); }
private static void SetupMacOptions(DriverOptions options) { options.MicrosoftMode = false; options.NoBuiltinIncludes = true; var headersPath = Path.Combine(GetSourceDirectory("build"), "headers", "osx"); options.addSystemIncludeDirs(Path.Combine(headersPath, "include")); options.addSystemIncludeDirs(Path.Combine(headersPath, "clang", "4.2", "include")); options.addSystemIncludeDirs(Path.Combine(headersPath, "libcxx", "include")); options.addArguments("-stdlib=libc++"); }
private static void SetupMacOptions(DriverOptions options) { options.MicrosoftMode = false; options.NoBuiltinIncludes = true; const string MAC_INCLUDE_PATH = @"C:\Development\CppSharp\build\vs2012\lib\Release_x32\"; #if OLD_PARSER options.SystemIncludeDirs.Add(MAC_INCLUDE_PATH + @"include"); options.SystemIncludeDirs.Add(MAC_INCLUDE_PATH + @"lib\libcxx\include"); options.SystemIncludeDirs.Add(MAC_INCLUDE_PATH + @"lib\clang\4.2\include"); options.Arguments.Add("-stdlib=libc++"); #else options.addSystemIncludeDirs(MAC_INCLUDE_PATH + @"include"); options.addSystemIncludeDirs(MAC_INCLUDE_PATH + @"lib\libcxx\include"); options.addSystemIncludeDirs(MAC_INCLUDE_PATH + @"lib\clang\4.2\include"); options.addArguments("-stdlib=libc++"); #endif }
private static void SetupLinuxOptions(DriverOptions options) { options.MicrosoftMode = false; options.NoBuiltinIncludes = true; string[] sysincdirs = new[] { "/usr/include/c++/4.8", "/usr/include/x86_64-linux-gnu/c++/4.8", "/usr/include/c++/4.8/backward", "/usr/lib/gcc/x86_64-linux-gnu/4.8/include", "/usr/include/x86_64-linux-gnu", "/usr/include", }; foreach (var dir in sysincdirs) { options.addSystemIncludeDirs(LINUX_INCLUDE_BASE_DIR + dir); } }
private static void SetupMacOptions(DriverOptions options) { options.MicrosoftMode = false; options.NoBuiltinIncludes = true; if (IsMacOS) { var headersPaths = new List<string> { Path.Combine(GetSourceDirectory("deps"), "llvm/tools/clang/lib/Headers"), Path.Combine(GetSourceDirectory("deps"), "libcxx", "include"), "/usr/include", }; foreach (var header in headersPaths) Console.WriteLine(header); foreach (var header in headersPaths) options.addSystemIncludeDirs(header); } var headersPath = Path.Combine(GetSourceDirectory("build"), "headers", "osx"); options.addSystemIncludeDirs(Path.Combine(headersPath, "include")); options.addSystemIncludeDirs(Path.Combine(headersPath, "clang", "4.2", "include")); options.addSystemIncludeDirs(Path.Combine(headersPath, "libcxx", "include")); options.addArguments("-stdlib=libc++"); }
private void SetupLinuxOptions(DriverOptions options) { options.MicrosoftMode = false; options.NoBuiltinIncludes = true; var headersPath = Platform.IsLinux ? string.Empty : Path.Combine(GetSourceDirectory("build"), "headers", "x86_64-linux-gnu"); // Search for the available GCC versions on the provided headers. var versions = Directory.EnumerateDirectories(Path.Combine(headersPath, "usr/include/c++")); if (versions.Count() == 0) throw new Exception("No valid GCC version found on system include paths"); string gccVersionPath = versions.First(); string gccVersion = gccVersionPath.Substring( gccVersionPath.LastIndexOf(Path.DirectorySeparatorChar) + 1); string[] systemIncludeDirs = new[] { Path.Combine("usr", "include", "c++", gccVersion), Path.Combine("usr", "include", "x86_64-linux-gnu", "c++", gccVersion), Path.Combine("usr", "include", "c++", gccVersion, "backward"), Path.Combine("usr", "lib", "gcc", "x86_64-linux-gnu", gccVersion, "include"), Path.Combine("usr", "include", "x86_64-linux-gnu"), Path.Combine("usr", "include") }; foreach (var dir in systemIncludeDirs) options.addSystemIncludeDirs(Path.Combine(headersPath, dir)); options.addDefines("_GLIBCXX_USE_CXX11_ABI=" + (IsGnuCpp11Abi ? "1" : "0")); }