问题
I have built the latest version of GCC in a directory. How do I point CLion to use it?
回答1:
After doing some more research, I realized that what I need to configure is CMake. Since CLion has a bundled CMake, you can configure this inside CLion.
Go to Settings -> Build, Execution, Deployment -> CMake. Under CMake options, add
-D CMAKE_CXX_COMPILER=...
and replace ...
with the path to g++
.
There are other ways to do this, which are probably better. I just did this and it worked, but if you want to dig in some more, see here:
https://cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F
来源:https://stackoverflow.com/questions/36246309/i-compiled-the-latest-version-of-gcc-how-to-point-clion-to-its-location