[cmake-developers] VS Toolchain Support

Brad King brad.king at kitware.com
Thu Aug 25 09:05:18 EDT 2016


On 08/24/2016 03:39 PM, Olmstead, Don wrote:
> For a first pass it might be best to just follow what is in cmIDEFlagTable
> as this would largely be unintrusive and just get the architecture there.

Yes, let's go with a direct mapping for now.  These files don't necessarily
have to be pretty.

On 08/24/2016 09:35 PM, Olmstead, Don wrote:
> class cmVisualStudio10ToolsetOptions
> {
> public:
>   cmIDEFlagTable const* GetClFlagTable(std::string name) const;
>   cmIDEFlagTable const* GetRcFlagTable(std::string name) const;
>   cmIDEFlagTable const* GetLibFlagTable(std::string name) const;
>   cmIDEFlagTable const* GetLinkFlagTable(std::string name) const;
>   cmIDEFlagTable const* GetMasmFlagTable(std::string name) const;
> };
> #endif

Looks good.  One challenge will be the toolset lookup.  There are many
variations of some toolset names and we need to figure out how to map
to a specific JSON file without duplicating them excessively.

> One possible addition might be to include the target architecture. It appears that
> at least within VS 2015 the Toolsets are organized first by architecture
> (MSBuild\Microsoft.Cpp\v4.0\V140\Platforms).

Yes, we can add that if needed.

> It feels like it should possibly get bolted onto cmGlobalVisualStudio10Generator
> with the Get*FlagTable methods moved over from cmVisualStudio10TargetGenerator.

Yes.

> Also from looking at the various definitions within MSBuild that creating a tool
> that parses the XML definitions into what's expected by whatever the JSON format
> ends up looking like wouldn't be too bad. I started a script in Python that would
> probably do the trick. If there's a preferred language though I can use that
> assuming something along those lines would be accepted in a patch.

For one-shot conversions any language is fine.  Source/cmparseMSBuildXML.py
is the script we currently use for this (followed by some hand editing).

> When contributing would you prefer a series of patches or just a
> single large patch?

We prefer series of incremental patches.

Thanks,
-Brad



More information about the cmake-developers mailing list