DawidPi
DawidPi

Reputation: 2355

CLion with Qt automoc files generated in project

I have got following problem:

using CLion with Qt for programming I have some problems with autogenerated automoc files (all *automoc.cpp files annoyingly appear in my project view).

The way I configured CMake to use Qt is as follows:

After each build there are automoc files generated for each CMake project for my build, which appear on top of my Project View in CLion (note: I cannot find those files in the directory in simple explorer).

Any advice on how to get rid of them from the project view? Or maybe how to do it the hard way - delete them after build is finished?

Upvotes: 1

Views: 535

Answers (2)

Wippo
Wippo

Reputation: 963

automoc file is generated when the compiler sees a Q_OBJECT macro in a header file: it (or them) tells that the object can use signals and slots or other interactive features. If you delete it, it will be re-create the next time you click "run my project".

Upvotes: 1

nastasiak2512
nastasiak2512

Reputation: 1937

CLion relies on CMake, that considers such files as a part of the project. So currently CLion has to display them somehow. There is a request to show them grouped. Also there are changes planned that will help with this.

Upvotes: 0

Related Questions