none
Build dependencies

    Question

  • Hello,
    I'm trying to use my own compiler with vs2005. It accepts the same switches and produces same output.
    The problem is that whenever I build my project all the files are recompiled (as though if I run rebuild).

    Before I used the same setup with vs.net and as far as I'm concerned it worked well, but with vs2005 entire project always gets rebuild. What I want to know is how does vs detects if an .obj or a final binary should be updated (sources/headers changed etc)

    thanks
    Tuesday, June 06, 2006 6:18 PM

Answers

  • no, it isn't, sorry. the IDE gets the dependency from cl.exe building the files in the project. if cl.exe doesn't build the files, the IDE won't have any dependency information about c++ source and header files.

    josh

    VC++ project system developer

    Monday, June 12, 2006 11:10 PM

All replies

  • Basicly all I need is to allow cl.exe do it's normal job - track all the dependencies, but the actual compilation is done by gcc, is that at all possible??
    thank you
    Wednesday, June 07, 2006 6:06 AM
  • no, it isn't, sorry. the IDE gets the dependency from cl.exe building the files in the project. if cl.exe doesn't build the files, the IDE won't have any dependency information about c++ source and header files.

    josh

    VC++ project system developer

    Monday, June 12, 2006 11:10 PM
  • Thanks for reply, I already figuered it out on my own after tracing with filemon to see who accesses *.idb database.

    So, I decided to rollup my own dependency tracker. I was thinking that was a huge difficult task and wanted to write an ugly parser that would recursively parse includes etc... but then I remembered that it's possible to get dependency list directly from gcc. sqlite for actual database ( :) didn't want to even do manual filehandling) and now it's ready and working just like the one from cl.exe.

    I have a small question however... When I build a project VS detects that file has to be updated (no dependency database exists) and then before executing cl.exe deletes output object file. I want to prevent this behavior. (now for every compiled object I store a copy and if no changes detected copy this copied obj to the obj itself)

    Is that possible to prevent this through and add-in or somehow else?

     

    thanks

    Monday, June 12, 2006 11:20 PM