Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
277 views
in Technique[技术] by (71.8m points)

c++ - can cmake and netbeans play nice?

I'm working on a big project, some might say awesome.

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.

Is there a smart way to make sure netbeans does not create new projects every time a sub directory is added?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Good news!

As of NetBeans 6.8, CMake is handled gracefully, just like any other configure script:

  1. Make a new "C/C++ Application from existing sources".
  2. Specify the directory of the project (where CMakeLists.txt resides).
  3. In the "Select configuration mode", select "Automatic".

And NetBeans will run cmake to build the Makefile when it's necessary
(or when you click "Reconfigure project").

See the original thread on the NetBeans forums for more info.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...