Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qmake delete a directory in osx
QtWS25 Last Chance

Qmake delete a directory in osx

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 2 Posters 1.8k Views
  • 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.
  • R Offline
    R Offline
    Rubin Stove
    wrote on last edited by Rubin Stove
    #1

    Is it possible to delete a directory by just adding some code in the .pro file ? Here is the situation:

    I have defined my proper build output into a separate build folder by overriding DESTDIR as below,
    DESTDIR = ../build/$${TARGET}/$$TARGET_PLATFORM

    Now I want to delete the extra build directory that was created default by qmake or qt. One with the name as "build-android-version #-blah-blah"

    Is it possible to persuade qmake to delete that default shadow build directory ?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rubin Stove
      wrote on last edited by
      #2

      Really appreciate any help offered here. Thanks in advance

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Why do you want to delete the shadow build folder ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        R 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Why do you want to delete the shadow build folder ?

          R Offline
          R Offline
          Rubin Stove
          wrote on last edited by
          #4

          @SGaist I am creating my own build directory with simple proper names where all the libraries of my project get built in. In this case it doesnt make sense to allow the shadow build folders to get created & just left around. So, I want to delete the shadow build folder to keep things clean.
          Also, I am making my modules available 4 different platforms which creates a long list of shadow build folders which are just getting created lying around for no use. I really want to keep this clean so that other developers do not complain of the unrequited default shadow build folders increasing junk in the build directory.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Shadow builds are an option in Qt Creator, just disable it there.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            R 1 Reply Last reply
            0
            • SGaistS SGaist

              Shadow builds are an option in Qt Creator, just disable it there.

              R Offline
              R Offline
              Rubin Stove
              wrote on last edited by
              #6

              @SGaist If I disable it, then it wont affect the destdir that I am defining & putting in the final built binary. Right ? or no ?

              How can I disable the shadow build option ?

              Thanks for you attention

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Rubin Stove
                wrote on last edited by Rubin Stove
                #7

                I found the shadow build check box can be disabled in the projects menu under General category. But this is an option that needs to be checked off by each developer, under each platform build type, under each library & also app.

                Isnt, there a property I can set in .pro file to disable shadow build of my libraries & app ? Or some kind of a one time do it simple solution ?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  No, nothing in the .pro file. As I wrote before, shadow builds are nice option provided by Qt Creator in order to avoid polluting one's source with build artifacts.

                  Note that setting DESTDIR only tells qmake where to put your final binary, all build artifacts stay where the build happens.

                  One alternative that you can use is to put all shadow builds under a common folder.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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