I think we should get the value, check it exists, and if it doesn't we can write a message to the user: populate this environment variable with your generator before calling this example... or add only the -G xxxxx if the variable exists (I don't know if CMake will choose an existing VS generator by default)
Yes, the -G cmake generator is generally necessary in Windows. It is necessary to add something in the script, that will fail if not defined and force to define it, otherwise it is very confusing for the user.
Yes, the -G cmake generator is generally necessary in Windows. It is necessary to add something in the script, that will fail if not defined and force to define it, otherwise it is very confusing for the user.