As discussed here:
https://discourse.llvm.org/t/build-llvm-release-bat-script-options
Add a function to parse command line arguments: parse_args.
The format for the arguments is:
Boolean: --option
Value: --option<separator>value
with <separator> being: space, colon, semicolon or equal sign
Command line usage example:
my-batch-file.bat --build --type=release --version 123
It will create 3 variables:
build with the value true
type with the value release
version with the value 123
Usage:
set "build=" set "type=" set "version=" REM Parse arguments. call :parse_args %* if defined build ( ... ) if %type%=='release' ( ... ) if %version%=='123' ( ... )
I'm probably missing something, but for --type=release it seems like this would set arg_name to type=release? Or does it get split into the name and value in some way?
Or, it looks like the code would maybe work for --type release, but in that case the example above would need updating.