Cpp-exe: can I select a compiler?

I use Gradle to build my C++ project in Windows.

I have installed Visual Studio, so Gradle uses cl.exe to compile sources.

But I prefer to use g++ of MinGW.

Is there a way to select a compiler, such as environment variables?

According to what’s written in the Gradle User Guide, you currently have to tweak the PATH environment variable for the Gradle process so that your preferred compiler comes first.

Thanks! I’m able to use g++ now.