microsoft / cpp_client_telemetry

1DS C++ SDK
Apache License 2.0
85 stars 47 forks source link

Use of positional parameters in build.sh #871

Open vidia opened 3 years ago

vidia commented 3 years ago

Is your feature request related to a problem? Right now build.sh uses a hybrid of positional parameters and getopts to parse the rest of the parameters. The problem is that getopts stops parsing at the first of the non-getopts parameters. Combined with the fact that positional parameters need to be on the first 3 positions basically limits the total number of parameters to 3 creating problems if more -D [CMAKE_OPTS] need to be passed.

Describe the solution you'd like. Consider moving to noroot & friends arguments at the end. Or integrate them into getopts arguments.

Right now the only way not take make build.sh ignore the -D arguments when using vcpkg is to move noroot at the end and have up to 2 -D.

maxgolov commented 3 years ago

We'd welcome a PR from you to fix it.