I am using Visual Studio Community 2019. I always need to change the CMakeSettings.json for every new CMake Project I make.
SET( CMAKE_CXX_COMPILER "C:/MinGW/bin/g++" )
How can i set MinGW as my default compiler so that i do not have to worry about setting compiler every time I create a new CMake Project.
There are solution given on this link:
Setting default compiler in CMake
but I am unable to follow any of them because they are not very clear for me.
Like the accepted solution says:
Set CMAKE_GENERATOR environment variable to specify the default generator to be used on your system.
But I don't know how to set CMAKE_GENERATOR environment variable to specify the default generator to be used on my system. I can do for my current project but i am unable to set the compiler at "C:/MinGW/bin/g++" as default for every new CMake Project. I know people have given working solutions but even after hours, due to very general instructions, i am unable to follow. Please provide step by step instructions with where to look for the file which i need to change.