Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. define 'Shadow Build' directory in .pro file
Forum Updated to NodeBB v4.3 + New Features

define 'Shadow Build' directory in .pro file

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 3 Posters 1.2k Views 2 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 10 Feb 2021, 22:29 last edited by
    #2

    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
    3
    • R Offline
      R Offline
      RodrigoCanellas
      wrote on 11 Feb 2021, 11:45 last edited by
      #3

      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?

      J 1 Reply Last reply 11 Feb 2021, 11:47
      0
      • R RodrigoCanellas
        11 Feb 2021, 11:45

        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?

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 11 Feb 2021, 11:47 last edited by
        #4

        @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
        1
        • R Offline
          R Offline
          RodrigoCanellas
          wrote on 11 Feb 2021, 11:59 last edited by RodrigoCanellas 2 Nov 2021, 12:00
          #5
          This post is deleted!
          1 Reply Last reply
          0
          • R Offline
            R Offline
            RodrigoCanellas
            wrote on 11 Feb 2021, 12:22 last edited by
            #6

            I meant in the common.pri file

            J 1 Reply Last reply 11 Feb 2021, 12:27
            0
            • R RodrigoCanellas
              11 Feb 2021, 12:22

              I meant in the common.pri file

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 11 Feb 2021, 12:27 last edited by
              #7

              @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
              1
              • R Offline
                R Offline
                RodrigoCanellas
                wrote on 11 Feb 2021, 12:37 last edited by
                #8

                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.

                J 1 Reply Last reply 11 Feb 2021, 12:55
                0
                • R RodrigoCanellas
                  11 Feb 2021, 12:37

                  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.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 11 Feb 2021, 12:55 last edited by
                  #9

                  @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
                  0
                  • R Offline
                    R Offline
                    RodrigoCanellas
                    wrote on 11 Feb 2021, 17:28 last edited by RodrigoCanellas 2 Dec 2021, 10:52
                    #10

                    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!

                    J 1 Reply Last reply 12 Feb 2021, 05:42
                    0
                    • R RodrigoCanellas
                      11 Feb 2021, 17:28

                      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!

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 12 Feb 2021, 05:42 last edited by
                      #11

                      @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
                      2
                      • R Offline
                        R Offline
                        RodrigoCanellas
                        wrote on 12 Feb 2021, 12:38 last edited by RodrigoCanellas 2 Dec 2021, 13:17
                        #12

                        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
                        0

                        11/12

                        12 Feb 2021, 05:42

                        • Login

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