Convert(
     this C.ICommonCompilerSettingsOSX settings,
     Bam.Core.StringArray commandLine)
 {
     foreach (var path in settings.FrameworkSearchPaths.ToEnumerableWithoutDuplicates())
     {
         commandLine.Add(System.String.Format("-F{0}", path.ToStringQuoteIfNecessary()));
     }
     if (!System.String.IsNullOrEmpty(settings.MinimumVersionSupported))
     {
         var minVersionRegEx = new System.Text.RegularExpressions.Regex("^(?<Type>[a-z]+)(?<Version>[0-9.]+)$");
         var match           = minVersionRegEx.Match(settings.MinimumVersionSupported);
         if (!match.Groups["Type"].Success)
         {
             throw new Bam.Core.Exception("Unable to extract SDK type from: '{0}'", settings.MinimumVersionSupported);
         }
         if (!match.Groups["Version"].Success)
         {
             throw new Bam.Core.Exception("Unable to extract SDK version from: '{0}'", settings.MinimumVersionSupported);
         }
         commandLine.Add(System.String.Format("-m{0}-version-min={1}",
                                              match.Groups["Type"].Value,
                                              match.Groups["Version"].Value));
     }
 }
Exemple #2
0
 Intersect(
     this C.ICommonCompilerSettingsOSX shared,
     C.ICommonCompilerSettingsOSX other)
 {
     shared.FrameworkSearchPaths    = shared.FrameworkSearchPaths.Intersect(other.FrameworkSearchPaths);
     shared.MinimumVersionSupported = shared.MinimumVersionSupported.Intersect(other.MinimumVersionSupported);
 }
Exemple #3
0
 Defaults(
     this C.ICommonCompilerSettingsOSX settings,
     Bam.Core.Module module)
 {
     // N.B. this default is set in the specific Clang version
     // as it's set on both compiler and linker
 }
 Delta(
     this C.ICommonCompilerSettingsOSX delta,
     C.ICommonCompilerSettingsOSX lhs,
     C.ICommonCompilerSettingsOSX rhs)
 {
     delta.FrameworkSearchPaths    = new Bam.Core.TokenizedStringArray(lhs.FrameworkSearchPaths.Except(rhs.FrameworkSearchPaths));
     delta.MinimumVersionSupported = (lhs.MinimumVersionSupported != rhs.MinimumVersionSupported) ? lhs.MinimumVersionSupported : null;
 }
Exemple #5
0
 Delta(
     this C.ICommonCompilerSettingsOSX delta,
     C.ICommonCompilerSettingsOSX lhs,
     C.ICommonCompilerSettingsOSX rhs)
 {
     delta.FrameworkSearchPaths    = lhs.FrameworkSearchPaths.Complement(rhs.FrameworkSearchPaths);
     delta.MinimumVersionSupported = lhs.MinimumVersionSupported.Complement(rhs.MinimumVersionSupported);
 }
 Clone(
     this C.ICommonCompilerSettingsOSX settings,
     C.ICommonCompilerSettingsOSX other)
 {
     foreach (var path in other.FrameworkSearchPaths)
     {
         settings.FrameworkSearchPaths.AddUnique(path);
     }
     settings.MinimumVersionSupported = other.MinimumVersionSupported.Clone() as string;
 }
 Intersect(
     this C.ICommonCompilerSettingsOSX shared,
     C.ICommonCompilerSettingsOSX other)
 {
     shared.FrameworkSearchPaths = new Bam.Core.TokenizedStringArray(shared.FrameworkSearchPaths.Intersect(other.FrameworkSearchPaths));
     if (shared.MinimumVersionSupported != other.MinimumVersionSupported)
     {
         shared.MinimumVersionSupported = null;
     }
 }
 Convert(
     this C.ICommonCompilerSettingsOSX settings,
     Bam.Core.Module module,
     XcodeBuilder.Configuration configuration)
 {
     if (null != settings.FrameworkSearchPaths)
     {
         var paths = new XcodeBuilder.MultiConfigurationValue();
         foreach (var path in settings.FrameworkSearchPaths)
         {
             paths.Add(path.ToString());
         }
         configuration["FRAMEWORK_SEARCH_PATHS"] = paths;
     }
     // settings.MinimumVersionSupported is dealt with in XcodeBuilder as there is not a difference
     // between compiler and linker setting in the project
 }
 Empty(
     this C.ICommonCompilerSettingsOSX settings)
 {
     settings.FrameworkSearchPaths = new Bam.Core.TokenizedStringArray();
 }
 Defaults(
     this C.ICommonCompilerSettingsOSX settings,
     Bam.Core.Module module)
 {
 }