Clion如何向项目添加文件 [英] Clion how to add files to a project
问题描述
这似乎真的基本。我如何添加文件到项目,而不必手动编辑 CMakeLists.txt
。
This seems really basic. How can i add files to a project without having to manually edit the CMakeLists.txt
.
例如源文件在另一个目录中
For example source files in another directory
推荐答案
CLion解析 CMakeLists.txt
生成项目视图,但我相信添加文件到项目的唯一方法是编辑 CMakeLists.txt
以包括这些文件。我期望最终这将改变类似IntelliJ与一个 pom.xml
文件在Java项目中的方式,但现在你编辑 CMakeLists .txt
。
CLion parses the CMakeLists.txt
and uses it to generate a project view, but I believe the only way to add files to the project is to edit the CMakeLists.txt
to include those files. I expect that eventually this will change similar to the way IntelliJ integrates with a pom.xml
file in a Java project, but for now you edit the CMakeLists.txt
.
这篇关于Clion如何向项目添加文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!