conan-io / examples

Conan 1.x examples
MIT License
124 stars 66 forks source link

Get cmake generator from environment in windows for lockfile example #70

Closed czoido closed 4 years ago

memsharded commented 4 years ago

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.