cmake 和 netbeans 可以玩吗?

2023-08-27C/C++开发问题
0

本文介绍了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 脚本一样:

  1. 从现有来源制作一个新的C/C++ 应用程序".
  2. 指定项目的目录(CMakeLists.txt 所在的目录).
  3. 在选择配置模式"中,选择自动".

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 可以玩吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

无法访问 C++ std::set 中对象的非常量成员函数
Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)...
2024-08-14 C/C++开发问题
17

从 lambda 构造 std::function 参数
Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)...
2024-08-14 C/C++开发问题
25

STL BigInt 类实现
STL BigInt class implementation(STL BigInt 类实现)...
2024-08-14 C/C++开发问题
3

使用 std::atomic 和 std::condition_variable 同步不可靠
Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)...
2024-08-14 C/C++开发问题
17

在 STL 中将列表元素移动到末尾
Move list element to the end in STL(在 STL 中将列表元素移动到末尾)...
2024-08-14 C/C++开发问题
9

为什么禁止对存储在 STL 容器中的类重载 operator&()?
Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)...
2024-08-14 C/C++开发问题
6