private CompilerSettings GetMasterCompilerSettings(IDictionary <string, CompilerSettings> masterCompilerSettings, string compilerName, DevEnv devEnv, string projectRootPath, bool useCCompiler) { CompilerSettings compilerSettings; if (masterCompilerSettings.ContainsKey(compilerName)) { compilerSettings = masterCompilerSettings[compilerName]; } else { var fastBuildSettings = PlatformRegistry.Get <IFastBuildCompilerSettings>(Platform.linux); string binPath; if (!fastBuildSettings.BinPath.TryGetValue(devEnv, out binPath)) { binPath = ClangForWindows.GetWindowsClangExecutablePath(); } string pathToCompiler = Util.GetCapitalizedPath(Util.PathGetAbsolute(projectRootPath, binPath)); Strings extraFiles = new Strings(); { Strings userExtraFiles; if (fastBuildSettings.ExtraFiles.TryGetValue(devEnv, out userExtraFiles)) { extraFiles.AddRange(userExtraFiles); } } var compilerFamily = Sharpmake.CompilerFamily.Clang; var compilerFamilyKey = new FastBuildCompilerKey(devEnv); if (!fastBuildSettings.CompilerFamily.TryGetValue(compilerFamilyKey, out compilerFamily)) { compilerFamily = Sharpmake.CompilerFamily.Clang; } string executable = useCCompiler ? @"$ExecutableRootPath$\clang.exe" : @"$ExecutableRootPath$\clang++.exe"; compilerSettings = new CompilerSettings(compilerName, compilerFamily, Platform.linux, extraFiles, executable, pathToCompiler, devEnv, new Dictionary <string, CompilerSettings.Configuration>()); masterCompilerSettings.Add(compilerName, compilerSettings); } return(compilerSettings); }
public bool Equals(FastBuildCompilerKey compilerFamilyKey) { return(DevelopmentEnvironment.Equals(compilerFamilyKey.DevelopmentEnvironment)); }