News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Rerun cmake before building

Started by marmistrz, April 23, 2016, 11:39:50 AM

Previous topic - Next topic

marmistrz

I'm using a cmake project with C::B. I added a couple of files and got a bunch of compile errors due to the fact I didn't rerun cmake before building. I used aux_source_directory to specify the source directory.

Is there a way to make C::B do that for me whenever I add a new file? I tried using this as a prebuild command, but this reset my project and I have to set up execution and the build cmds once again ;/

oBFusCATed

Are you using the cmake's codeblocks generators?
And generally it is not good idea to rebuild the projects during build/rebuild/etc.
The visual studio generators are doing this and the user experience is dreadful.
The best thing you could do is to setup a tool that runs "cmake ." in the appropriate directory.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

marmistrz

Yep, I'm using the C::B generator.

Can you please elaborate about 'the best thing I could do'? What kind of tool? An external script, something launched from within C::B?

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]