Qt Forum

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

    Unsolved define 'Shadow Build' directory in .pro file

    General and Desktop
    3
    12
    467
    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
      RodrigoCanellas last edited by

      Hi!

      I would like to define the build directory, just like in Shadow Build, but in my common.pri file.

      I read somewhere that defining OUT_PWD would do the trick, but it did not.

      Does anyone know how to do it?

      TIA!

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

        Hi,

        It'd not something you define at the .pro file level. A shadow build is simply an out of source build.

        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 3
        • R
          RodrigoCanellas last edited by

          Ok, I understand.

          I need to place all the Makefile in a different directory, just like the Shadow Build does.

          Is there anyway to do it?

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @RodrigoCanellas last edited by

            @RodrigoCanellas said in define 'Shadow Build' directory in .pro file:

            Is there anyway to do it?

            Yes, out of source build, just like @SGaist already wrote.

            mkdir build_folder
            cd build_folder
            qmake ../project_folder
            make
            

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 1
            • R
              RodrigoCanellas last edited by RodrigoCanellas

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • R
                RodrigoCanellas last edited by

                I meant in the common.pri file

                jsulm 1 Reply Last reply Reply Quote 0
                • jsulm
                  jsulm Lifetime Qt Champion @RodrigoCanellas last edited by

                  @RodrigoCanellas Why would you define build folder inside project file? Especially if more than one person is working on a project that can lead to problems.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply Reply Quote 1
                  • R
                    RodrigoCanellas last edited by

                    The idea is that this configuration can be commited to a version control (like git), and every developer can get it, regardless the QtCreator configuration, which stays, AFIK, in a file that can not be in a versioned directory. If a developer does not turn on Shadow Build and/or set Build Path correctly, can lead to build erros.

                    jsulm 1 Reply Last reply Reply Quote 0
                    • jsulm
                      jsulm Lifetime Qt Champion @RodrigoCanellas last edited by

                      @RodrigoCanellas I never saw a project storing path to build folder inside project configuration to be honest. A developer should be able to set build folder properly the way he/she wants it to be.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply Reply Quote 0
                      • R
                        RodrigoCanellas last edited by RodrigoCanellas

                        Ok, I accept defeat... and what about the variables used in Build & Run/Default build directory , like Kit:FileSystemName and BuildConfig:Name? Would you know where can I get a list of these variables? I think I can get a result closer to the one I wanted, by using them.

                        More precisely, I would like to define something like build/<platform>-<architecture>-<configuration>, producing build/win-x64-debug.

                        Thanks for your help!

                        jsulm 1 Reply Last reply Reply Quote 0
                        • jsulm
                          jsulm Lifetime Qt Champion @RodrigoCanellas last edited by

                          @RodrigoCanellas For qmake variables see: https://doc.qt.io/qt-5/qmake-variable-reference.html
                          For QtCreator check this: https://stackoverflow.com/questions/35970727/use-of-variables-like-builddir-in-qtcreator-kit-settings-in-qt5

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply Reply Quote 2
                          • R
                            RodrigoCanellas last edited by RodrigoCanellas

                            Thanks a lot!

                            I think I'll be able to do what I want through % variables, but it seems the A->B button does not show the entire list, and I could not find what possible values for <value> in, for example, Compile:Name:<value>.

                            I saw now the Debugger:Abi, which in my case evaluates in x86-darwin-generic-mach_o-64bit arm-darwin-generic-mach_o-64bit. I do not know why it reports the two CPU architectures supported by the compiler, even though the current Kit defines x86.

                            If there was a way to access the current ABI, may be through %Kit variable, and then to access each part of the ABI definition, that would do it.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post