Did a bit of poking around the CMake codebase to see what a patch might look
like. Was thinking something along the lines of this.
#ifndef cmVisualStudio10ToolsetOptions_h
#define cmVisualStudio10ToolsetOptions_h
#include "cmStandardIncludes.h"
struct cmIDEFlagTable;
/** \class cmVisualStudio10ToolsetOptions
* \brief Retrieves toolset options for MSBuild.
*
* cmVisualStudio10ToolsetOptions manages toolsets within MSBuild
*/
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
This particular class would handle the loading of the JSON data and returning
it to the client code in the current cmIDEFlagTable setup.
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).
It feels like it should possibly get bolted onto
cmGlobalVisualStudio10Generator with theGet*FlagTable methods moved over from
cmVisualStudio10TargetGenerator.
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.
When contributing would you prefer a series of patches or just a single large
patch?
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers