I am developing with Clion and minigw-w64. The IDE uses cmake.
I discovered a bug in GCC that is forcing me to switch compilers, I have no choice. The bug has to do with how gcc handles stack alignment. Clion seems to only support minigw and cygwin on windows, which I believe are both tool sets that use the gcc compiler.
Is there an easy way to get Clion / cmake to use a different compiler? I've read that clang is very similar to GCC because it accepts the same compiler flags, so I wonder if this might be a good alternative. I've also read you can change the compiler that cmake uses just by changing some flags, but I don't know in which file to put this, or if changing this will break compatibility with Clion.
From CLion's FAQ
At present CLion supports GCC and Clang compilers and is guided by these two to get the libraries and headers paths. In the next releases we are planning to extend the list of compilers available in CLion.
To change the compiler, go to the Cache tab in CMake tool window and set the compiler’s path to theCMAKE_CXX_COMPILER
variable. Then press Enter and click the Apply Changes and Reload button:
Search our issue tracker for feature requests about supporting other compilers to follow or vote on them, or add a new one if it’s missing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With