can cmake and netbeans play nice?(cmake 和 netbeans 可以玩吗?)
问题描述
我正在做一个大项目,有些人可能会说很棒.
I'm working on a big project, some might say awesome.
该项目正在使用 c++ 和 cmake 和 netbeans 开发.一切正常,除了每次我更新项目、添加或删除源文件时,netbeans 都会运行 cmake 并将一个新项目添加到项目"列表中.这有点烦人,因为我经常这样做.
The project is being developed in c++ with cmake and netbeans. Everything is working fine except from the fact that every time I do updates to the project, add or remove source files, netbeans runs cmake and adds a new project to 'projects' list. This is somewhat annoying since i tend to do this alot.
有没有一种聪明的方法来确保每次添加子目录时 netbeans 都不会创建新项目?
Is there a smart way to make sure netbeans does not create new projects every time a sub directory is added?
推荐答案
好消息!
从 NetBeans 6.8 开始,CMake 被优雅地处理,就像任何其他 configure 脚本一样:
- 从现有来源制作一个新的C/C++ 应用程序".
- 指定项目的目录(
CMakeLists.txt所在的目录). - 在选择配置模式"中,选择自动".
NetBeans 将在必要时运行 cmake 来构建 Makefile
(或者当您点击重新配置项目"时).
And NetBeans will run cmake to build the Makefile when it's necessary
(or when you click "Reconfigure project").
有关详细信息,请参阅 NetBeans 论坛上的原始主题.
See the original thread on the NetBeans forums for more info.
这篇关于cmake 和 netbeans 可以玩吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:cmake 和 netbeans 可以玩吗?
基础教程推荐
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 初始化列表*参数*评估顺序 2021-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- CString 到 char* 2021-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
