Adding script to convert from MSBuild XML to a JSON format
Here is the initial script to convert MS Build files to a JSON format. I wanted to get some feedback on the output and present how to run it all while I work on hooking it all in.
Outstanding questions
- Should the architecture also be within the name?
- Where should the JSON files be outputted to? (Currently thinking
Modules/Platform/MSBuild
)
Current gotchas
- MASM has flags like
/Fo"[value]"
(Think maybe a special case that needs to be handled) - Clang sometimes has trailing whitespace in the flag (Should be able to just trim output)
To run through VS 140
python Source\cmConvertMSBuildXMLToJSON.py ^
--toolchain v140 ^
--output Modules\Platform\MSBuild ^
"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\1033\cl.xml" ^
"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\1033\lib.xml" ^
"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\masm.xml" ^
"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\1033\rc.xml" ^
"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\1033\link.xml"
To run through Clang vc140_clang_c2
python Source\cmConvertMSBuildXMLToJSON.py ^
--toolchain v140_clang_c2 ^
--output Modules\Platform\MSBuild ^
"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\1033\clang.xml" ^
"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\1033\clanglink.xml"
With LLVM snapshots I'm not seeing any special project files.