How to compile a single .cpp file rather than build whole project?
已回答
hi
I usualy use Visual C++ on Windows. Now I am working with CLion on Linux. I need to grow comfortable with CLion real quick, so I am just trying to figure out how to do some of the basic things I do all day in Visual Studio. So, my question is: How can I compile a single .cpp file that is part of my project? When I work on a single file, I often want to compile the single file over and over until it compiles without necessarily getting errors from a million other places. In Visual Studio I just right click on the file name and click 'Compile' or ctrl-F7. How do I do this in CLion? Thanks in advance.
请先登录再写评论。
Unfortunately, it hasn't been implemented yet: https://youtrack.jetbrains.com/issue/CPP-480. Feel free to comment or upvote.
Implemented as of CLion 2018.2
https://blog.jetbrains.com/clion/2018/05/clion-starts-2018-2-eap-sanitizers-gradle-db-performance/#recompile_single_file