Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Qmake delete a directory in osx

    Mobile and Embedded
    2
    8
    1363
    Loading More Posts
    • 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
      Rubin Stove last edited by Rubin Stove

      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 Reply Quote 0
      • R
        Rubin Stove last edited by

        Really appreciate any help offered here. Thanks in advance

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          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 Reply Quote 0
          • R
            Rubin Stove @SGaist last edited by

            @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 Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              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 Reply Quote 0
              • R
                Rubin Stove @SGaist last edited by

                @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 Reply Quote 0
                • R
                  Rubin Stove last edited by Rubin Stove

                  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 Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    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 Reply Quote 0
                    • First post
                      Last post