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. How to specify "shadow build=true" and set build directory in the *.pro file?
Forum Updated to NodeBB v4.3 + New Features

How to specify "shadow build=true" and set build directory in the *.pro file?

Scheduled Pinned Locked Moved General and Desktop
11 Posts 4 Posters 8.5k 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.
  • _ Offline
    _ Offline
    _Dima
    wrote on last edited by
    #1

    Could you please advise how can I set "shadow build=true" and specific build directory in the *.pro file?
    Or at least how can I do that when I run qmake command?
    By default qmake places Make files in the each project directory.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Hi,
      I don't think it will be set in the pro file, but in the pro.user file.
      It might be better to use the QtCreator projects tab to change your settings and check what happens to that file.

      Greetz, Jeroen

      1 Reply Last reply
      0
      • _ Offline
        _ Offline
        _Dima
        wrote on last edited by
        #3

        [quote author="Jeroentje@home" date="1397050823"]Hi,
        I don't think it will be set in the pro file, but in the pro.user file.
        It might be better to use the QtCreator projects tab to change your settings and check what happens to that file.
        [/quote]

        It sounds good but...

        My project is used by a lot of developers and I cannot force them to set the same settings in their QtCreator's. People just download the pro file from the source control system and this pro file must be configured correctly for using in the QtCreator.

        Also pro.user file is not recommended for replacing between machines (this file contains locale ID's)

        Also build machine runs qmake + pro file in the command line and I want to set specific build directory. By default it's the dir of the each project and "shadow build=false".

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

          Looks like duplicate of this "thread":http://qt-project.org/forums/viewthread/40555/

          Have a look at "this":http://qt-project.org/doc/qtcreator-3.0/creator-sharing-project-settings.html

          For the build machine, just create the build folder and call qmake from there.

          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
          • _ Offline
            _ Offline
            _Dima
            wrote on last edited by
            #5

            [quote author="SGaist" date="1397052406"]Looks like duplicate of this "thread":http://qt-project.org/forums/viewthread/40555/

            Have a look at "this":http://qt-project.org/doc/qtcreator-3.0/creator-sharing-project-settings.html

            For the build machine, just create the build folder and call qmake from there.[/quote]

            Oh... Sharing of the pro.user looks good... I'm going to investigate about it.

            1 Reply Last reply
            0
            • _ Offline
              _ Offline
              _Dima
              wrote on last edited by
              #6

              I cannot make pro.shared work...

              I've created following pro.user.shared file:
              @
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE QtCreatorProject>
              <qtcreator>
              <data>
              <variable>ProjectExplorer.Project.Target.0</variable>
              <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
              <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">../build/qmakeTesting-Qt_5_2_1_msvc2010-Debug</value>
              <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
              </valuemap>
              <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
              <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">../build/qmakeTesting-Qt_5_2_1_msvc2010-Release</value>
              <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
              </valuemap>
              </data>
              </qtcreator>

              @

              But when I open pro file following window is showed and pro.user.shared params are not loaded
              !http://oi58.tinypic.com/2w4d6xd.jpg(warning)!

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

                You didn't create a pro.shared file but a pro.user.shared that might be the problem

                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
                • _ Offline
                  _ Offline
                  _Dima
                  wrote on last edited by
                  #8

                  [quote author="SGaist" date="1397064072"]You didn't create a pro.shared file but a pro.user.shared that might be the problem[/quote]

                  Sorry, I've changed the message above, I create pro.user.shared file.

                  In the result, I've created full copy of pro.user, rename it to pro.user.shared. It works. After that I deleted lines one by one... And if the pro.user.shared file contains full original section ProjectExplorer.Project.Target.0 (it's about 50 lines) then it works, if I delete one or few lines it shows message mentioned above and doesn't apply build directory to the pro.user file.

                  I cannot use this full section. It has list of sub projects and other local information. I need only build directory and shadow build option.

                  So... This cool option (pro.user.shared file) doesn't work completly.

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

                    According to the "doc":http://qt-project.org/doc/qtcreator-3.0/creator-sharing-project-settings.html#creating-shared-settings-file the file name is .pro.shared

                    1 Reply Last reply
                    0
                    • _ Offline
                      _ Offline
                      _Dima
                      wrote on last edited by
                      #10

                      [quote author="andreyc" date="1397068610"]According to the "doc":http://qt-project.org/doc/qtcreator-3.0/creator-sharing-project-settings.html#creating-shared-settings-file the file name is .pro.shared
                      [/quote]

                      Hm...
                      QtCreator doesn't react to the pro.shared file absolutly... But it reads pro.user.shared file

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

                        In the qtcreator sources the file name suffixes are calculated like this
                        @
                        m_userSuffix = generateSuffix(QString::fromLocal8Bit(qgetenv("QTC_EXTENSION")), QLatin1String(".user"));
                        m_sharedSuffix = generateSuffix(QString::fromLocal8Bit(qgetenv("QTC_SHARED_EXTENSION")), QLatin1String(".shared"));
                        @

                        So it should read .pro.shared file. :-)
                        But anyway in the "doc":http://qt-project.org/doc/qtcreator-3.0/creator-sharing-project-settings.html#creating-shared-settings-file it says
                        "Typically, you would share some of the values in the ProjectExplorer.Project.EditorSettings section."
                        Which is less then you are trying to share.

                        It looks like you are creating a pretty complex build environment.
                        Maybe qmake is not suitable for such task.
                        Have you looked on "qbs":http://qt-project.org/doc/qbs-1.1/index.html ?

                        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