Author Topic: pre-compile steps for individual files?  (Read 4337 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
pre-compile steps for individual files?
« on: November 07, 2010, 06:25:04 pm »
Hi guys! I was wondering...

Is there a way to add a pre-compile step for a particular file in the project? (The usual Qt moc business). I recently posted in another thread how to invoke moc using a custom compiler command before compiling the actual file, but i think it'd be nice if there was a setting (under "properties", for example) to pre-compile the main file without having to resort to using specialized plugins (Qtworkbench) or adding phantom files for the pre-compile steps.

How hard would it be to add that?

Thanks!

Sincerely,
Rick.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6079
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: pre-compile steps for individual files?
« Reply #1 on: November 11, 2010, 02:41:52 pm »
project build option dialog has a page: pre/post build steps.
Does this works? :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: pre-compile steps for individual files?
« Reply #2 on: November 11, 2010, 07:32:03 pm »
project build option dialog has a page: pre/post build steps.
Does this works? :D
That's for the project or target, but not only for some files of a target/project and I am absolutely sure Rick knows pre/post-buildsteps.