Ejemplo n.º 1
0
        public Optional <string> Create(Optional <string> directory)
        {
            if (!Skip)
            {
                var name     = Name.Select(n => n, () => "");
                var nuspecId = "boost_" + name;
                var srcFiles =
                    FileList.Select(
                        f =>
                        new Nuspec.File(
                            directory.Select(d => Path.Combine(d, f), () => f),
                            Path.Combine(Targets.SrcPath, f)
                            )
                        );
                //
                foreach (var u in CompilationUnitList)
                {
                    u.Make(this);
                }
                //
                var clCompile =
                    new Targets.ClCompile(
                        preprocessorDefinitions:
                        PreprocessorDefinitions.
                        Concat(new[] { nuspecId.ToUpper() + "_NO_LIB" }).
                        ToOptionalClass()
                        );

                Nuspec.Create(
                    nuspecId,
                    nuspecId,
                    Config.Version,
                    nuspecId,
                    new[]
                {
                    new Targets.ItemDefinitionGroup(clCompile: clCompile)
                },
                    srcFiles,
                    CompilationUnitList,
                    BoostDependency,
                    new[] { "sources", name }
                    );
                return(Name);
            }
            else
            {
                return(Optional <string> .Absent.Value);
            }
        }
Ejemplo n.º 2
0
        public Optional<string> Create(Optional<string> directory)
        {
            if (!Skip)
            {
                var name = Name.Select(n => n, () => "");
                var nuspecId = "boost_" + name;
                var srcFiles =
                    FileList.Select(
                        f =>
                            new Nuspec.File(
                                directory.Select(d => Path.Combine(d, f), () => f),
                                Path.Combine(Targets.SrcPath, f)
                            )
                    );
                //
                foreach (var u in CompilationUnitList)
                {
                    u.Make(this);
                }
                //
                var clCompile =
                    new Targets.ClCompile(
                        preprocessorDefinitions:
                            PreprocessorDefinitions.
                                Concat(new[] { nuspecId.ToUpper() + "_NO_LIB" }).
                                ToOptionalClass()
                    );

                Nuspec.Create(
                    nuspecId,
                    nuspecId,
                    Config.Version,
                    nuspecId,
                    new[]
                    {
                        new Targets.ItemDefinitionGroup(clCompile: clCompile)
                    },
                    srcFiles,
                    CompilationUnitList,
                    BoostDependency,
                    new[] { "sources", name }
                );
                return Name;
            }
            else
            {
                return Optional<string>.Absent.Value;
            }
        }