User forums > General (but related to Code::Blocks)

Precompiled headers

<< < (2/2)

Biplab:

--- Quote from: Alturin on April 09, 2007, 04:21:40 pm ---Wouldn't that be because rebuild = clean+build, so it'd have to rebuild the header file cos it got cleaned?

--- End quote ---

Yes.

valkenar:
Thank you having taken the time to look at it. I'm really not sure what the difference here is. I'm rather certain that I'm not rebuilding. I hit ctrl-f9 to start my builds, which is the hot-key listed next to the "build" menu item, first on the list in the build menu. Also, none of my other cpp files are being recompiled, just the one generated by the header-compilation step.

Remember, I'm using a custom build command here, not standard precompiled headers. The header file is configured to execute a custom command on compilation. What I'm trying to avoid is executing that command if the header file has not actually changed. If it's just some quirk in the way I've installed/configured codeblocks then I guess I'll just take another look around the options for something that would cause what I'm seeing.

As another data point, if I choose to compile (ctrl-shift-f9) a header file without a custom build parameter, it precompiles once, and then says "nothing to be done" on successive attempts. Whereas on my custom-command headers, it will display "precompiling header" every time.  Maybe I need to create a dummy pch as part of my custom step, so that codeblocks understands that the header has been compiled?

valkenar:
Update:

I couldn't figure out how to prevent it from running the header precompilation step, so I just wrote a small utility called mocifnew which only executes the moc command if the source is older than the header.  This solves the problem, albeit inellegantly.

Navigation

[0] Message Index

[*] Previous page

Go to full version