Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Compiling a subproject from a larger superproject
Forum Updated to NodeBB v4.3 + New Features

Compiling a subproject from a larger superproject

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 3 Posters 2.0k 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.
  • E Offline
    E Offline
    eddyilg
    wrote on last edited by
    #1

    Hi,

    I have a large project that has many (nested) "subdir" projects. One of these "subdir" projects is a library and the others are applications that require the library.

    If I make a change in the library and want to compile ONLY one application for testing, I have to recompile the whole project (all applications).

    What I would actually like is that if I compile only ONE application - and have made a change in the library - qmake detects the change in the dependency and compiles the library first and then the application (instead of compiling everything; the other applications should not be touched).

    Is this possible to do with qmake?

    Cheers,

    Eddy

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      If you run make in command line in the build directory then it will rebuild only changed files and dependent applications.
      In qtcreator build on the top level project should do the same.
      You don't need to run qmake if change the sources and did not change the project structure.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        eddyilg
        wrote on last edited by
        #3

        That's what I am doing. But this results in re-linking all applications which is annoying since it takes some time...

        What I kind of want is a project dependency, i.e. that the library project is built before the applcation.

        Regards,

        Eddy

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andreyc
          wrote on last edited by
          #4

          Yep, you are right. If other apps depend on that library then make will relink all of them.
          I had an impression the calling "make some/path/myapp" will rebuild library and my app only. But it does not work this way.
          My bad. Need to test my suggestion before posting them.

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            qxoz
            wrote on last edited by
            #5

            have you try
            @CONFIG += ordered@
            doc says: "When using the subdirs template, this option specifies that the directories listed should be processed in the order in which they are given."
            "CONFIG":https://qt-project.org/doc/qt-5/qmake-variable-reference.html#config

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved