Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Project Management, long compile-times

Project Management, long compile-times

Scheduled Pinned Locked Moved C / C++ / MFC
designbusinessquestionlearning
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zqueezy
    wrote on last edited by
    #1

    heyhey, I have several projects that are dependent of each other with a lot of source and header files. Like project: A<-B<-C<-D (B dependent of A, ...) The projects themselves are each quite large and except one they all build static libraries (of course?). In each project I have a file called like ProjectCPrivate.h that I include from each header file from within project C. in this header actually only project B is referenced (and indirectly A) and some settings (defines) for the project itself. Also for each project I have a file like ProjectC which includes pretty much every class from project C, so that I can easily use this header file for project D and so on... I'm facing long compile-times as the project grows. I'm not 100% sure if all this is solved by precompiled headers if used correctly. maybe my projects-design is lacking efficiency from the beginning. Using a precompiled header for each project would pretty much map the precompiled-header file to ProjectXPrivate.h, right? What do you guys think? Thanks a lot in advance zqueezy

    _ C S 3 Replies Last reply
    0
    • Z zqueezy

      heyhey, I have several projects that are dependent of each other with a lot of source and header files. Like project: A<-B<-C<-D (B dependent of A, ...) The projects themselves are each quite large and except one they all build static libraries (of course?). In each project I have a file called like ProjectCPrivate.h that I include from each header file from within project C. in this header actually only project B is referenced (and indirectly A) and some settings (defines) for the project itself. Also for each project I have a file like ProjectC which includes pretty much every class from project C, so that I can easily use this header file for project D and so on... I'm facing long compile-times as the project grows. I'm not 100% sure if all this is solved by precompiled headers if used correctly. maybe my projects-design is lacking efficiency from the beginning. Using a precompiled header for each project would pretty much map the precompiled-header file to ProjectXPrivate.h, right? What do you guys think? Thanks a lot in advance zqueezy

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      You could try to use the /MP compiler switch for multiple copies of the compiler (cl.exe). But this will not work with pre-compiled headers. So you will have to disable pre-compiled headers. Build with Multiple Processes[^]

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      1 Reply Last reply
      0
      • Z zqueezy

        heyhey, I have several projects that are dependent of each other with a lot of source and header files. Like project: A<-B<-C<-D (B dependent of A, ...) The projects themselves are each quite large and except one they all build static libraries (of course?). In each project I have a file called like ProjectCPrivate.h that I include from each header file from within project C. in this header actually only project B is referenced (and indirectly A) and some settings (defines) for the project itself. Also for each project I have a file like ProjectC which includes pretty much every class from project C, so that I can easily use this header file for project D and so on... I'm facing long compile-times as the project grows. I'm not 100% sure if all this is solved by precompiled headers if used correctly. maybe my projects-design is lacking efficiency from the beginning. Using a precompiled header for each project would pretty much map the precompiled-header file to ProjectXPrivate.h, right? What do you guys think? Thanks a lot in advance zqueezy

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        zqueezy wrote:

        Using a precompiled header for each project would pretty much map the precompiled-header file to ProjectXPrivate.h, right?

        you could also put all the standard C/C++ .H files in there (STL, stdio, windows.h, etc.). i just did that last night for a 12-project solution - all the non-project includes went into the PCH, along with anything that would cause a full (or near full) rebuild anyway. seems to have sped-up the build a bit. it wasn't a huge difference, however.

        image processing toolkits | batch image processing

        1 Reply Last reply
        0
        • Z zqueezy

          heyhey, I have several projects that are dependent of each other with a lot of source and header files. Like project: A<-B<-C<-D (B dependent of A, ...) The projects themselves are each quite large and except one they all build static libraries (of course?). In each project I have a file called like ProjectCPrivate.h that I include from each header file from within project C. in this header actually only project B is referenced (and indirectly A) and some settings (defines) for the project itself. Also for each project I have a file like ProjectC which includes pretty much every class from project C, so that I can easily use this header file for project D and so on... I'm facing long compile-times as the project grows. I'm not 100% sure if all this is solved by precompiled headers if used correctly. maybe my projects-design is lacking efficiency from the beginning. Using a precompiled header for each project would pretty much map the precompiled-header file to ProjectXPrivate.h, right? What do you guys think? Thanks a lot in advance zqueezy

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          zqueezy wrote:

          I have a file called like ProjectCPrivate.h that I include from each header file from within project C

          Sounds like you're coupling the external interface of each 'Project C' to the internal interface - that's probably something to minimise, otherwise changes to that internal interface will require rebuilding of the whole system that's upstream of it. That should help when doing incremental builds. As for full builds...well, I've never found that the number of include files is much of a problem - it's the total amount of source code needing to be built...

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p CodeProject MVP for 2010 - who'd'a thunk it!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups