Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Support native packages with spaces in the "Platform toolset" pivot #39

Open
deepakverma opened this issue Nov 8, 2013 · 3 comments
Open

Comments

@deepakverma
Copy link

ported from : https://nuget.codeplex.com/workitem/3702
I'm trying to build native nuget package for Google C++ Testing Framework as described at http://coapp.org/reference/autopackage-ref.html#Pivots. It's ok for v110, v100, v110_xp toolsets. But I failed to build package for "LLVM-vs2012" and "Intel C++ Compiler XE 14.0" platform toolsets. The command "Write-NuGetPackage" fails when there is any space of '-' character in the platform toolset choices list.

@fearthecowboy
Copy link
Member

Ah. Interesting.

I may have to make a fix for something like that. Can you post your .autopkg script and let me play around a bit?

@wizardsd
Copy link

Ok. I'll try to find it... You can try to build a package with LLVM from http://llvm.org/builds/ -->
"Alternatively, invoke MSBuild with /p:PlatformToolset=LLVM-vs2012 to try out the toolchain without modifying the project files."

@wizardsd
Copy link

I have an example:

configurations {
    Toolset {
        key: "PlatformToolset";
        choices : { v120, v100, v110, v110_xp, LLVM-vs2010 };
        icc14.aliases : { icc15 };
    };

    Linkage {
        choices : { static };
        description = "Which version of the .lib file to link to this library";

        static.description = "Static";
    };

    CallingConvention {
        choices : { cdecl };
    }
}

nuget{
    nuspec {
        id = googletest;
        version : 1.7.0.2;
        title: Google' framework;
        authors: {Google};
        owners: {Google};
        licenseUrl: "http://opensource.org/licenses/BSD-3-Clause";
        projectUrl: "https://code.google.com/p/googletest/";
        iconUrl: "https://ssl.gstatic.com/codesite/ph/images/phosting.ico";
        requireLicenseAcceptance:false;
        summary: Google's framework for writing C++ tests on a variety of platforms;

        /* if you need to span several lines you can prefix a string with 
         an @ symbol (exactly like c# does). */

        description: @"Google's framework for writing C++ tests on a variety of platforms (Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian). Based on the xUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, value- and type-parameterized tests, various options for running the tests, and XML test report generation.";
        releaseNotes: "Release of gtest 1.7.0";
        copyright: Copyright 2013;
        tags: { native, googletest };
    };

    // the files that go into the content folders
    files {

        nestedInclude: {
            #destination = ${d_include}\gtest;
             "src\include\**\*"
        };

        ("v100,v110", "Win32,x64", "release,debug", "Static", "cdecl") => {
            [${0},${1},${2},${3},${4}] {
                lib:     { .\src\msvc\output\${0}\${1}\${2}\${3}\${4}\*.lib };
                symbols: { .\src\msvc\Intermediate\gtest\${0}\${1}\${2}\${3}\${4}\*.pdb };
            };
        };
    };

    targets {
            // We're trying to be standard about these sorts of thing. 
            // (Will help with config.h later :D)
            Defines += HAS_GOOGLETEST;
            [v110]
                Defines += _VARIADIC_MAX=10;
    }

}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants