I compiled the latest version of GCC. How to point CLion to its location?

雨燕双飞 提交于 2019-12-24 14:59:09

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!