Uploaded image for project: 'Open Development'
  1. Open Development
  2. OPEN-45

pass-through options (-- <...>) not visible for autobuild --verbose configure and autobuild --verbose build

    XMLWordPrintableJSON

    Details

    • Approvals:
      Code Review, Product Owner
    • Acceptance Criteria:
      with --verbose, the exact command that will be executed should be displayed, including all options, whether it got them from the configuration or the command line

      Description

      Passing options through with --

      If one wants to pass additional options to the configure command (e.g. cmake for the viewer) or to the build command (e.g. make on Linux) without editing the configuration, one can do so, by passing them after a double dash (which is used to separate them from options to autobuild or its subcommands) e.g. like this:

      autobuild configure -c OpenSourceStandAloneRelWithDebInfo -- -DGLH_INCLUDE_DIR=$(pwd)/build-linux-i686/packages/include
      autobuild build -c OpenSourceStandAloneRelWithDebInfo -- -j1
      

      See what gets run with --verbose

      When the standard option --verbose is passed, configure and build will show the configure command or build command they will run:

      autobuild --verbose configure -c OpenSourceStandAloneRelWithDebInfo
      

      gives

      executing configure command cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DUNATTENDED:BOOL=OFF -DWORD_SIZE:STRING=32 -DROOT_PROJECT_NAME:STRING=SecondLife -G 'Unix Makefiles' -DSTANDALONE:BOOL=TRUE -DINSTALL_PROPRIETARY=FALSE -DFMOD=FALSE ../indra
      [...]
      


      Or for build:

      autobuild --verbose build -c OpenSourceStandAloneRelWithDebInfo
      

      gives

      executing configure command cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DUNATTENDED:BOOL=OFF -DWORD_SIZE:STRING=32 -DROOT_PROJECT_NAME:STRING=SecondLife -G 'Unix Makefiles' -DSTANDALONE:BOOL=TRUE -DINSTALL_PROPRIETARY=FALSE -DFMOD=FALSE ../indra
      [...]
      executing build command make -j 12
      

      (For testing, you might want to also specify --dry-run, so that the interesting output doesn't get lost between the output of the configure command or build command. Additionally, --no-configure for build suppresses re-configuration, so that only the build command will be shown.)

      Combining the two above: See what gets run with --verbose when also passing options through with --

      Though, any of the passed-through options are omitted from that output, although they will be part of the actually executed command. (Which can be checked by passing something through that has an easily verifiable effect.)

      e.g.

      autobuild --verbose --dry-run configure -c OpenSourceStandAloneRelWithDebInfo -- -DGLH_INCLUDE_DIR=$(pwd)/build-linux-i686/packages/include
      

      gives

      executing configure command cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DUNATTENDED:BOOL=OFF -DWORD_SIZE:STRING=32 -DROOT_PROJECT_NAME:STRING=SecondLife -G 'Unix Makefiles' -DSTANDALONE:BOOL=TRUE -DINSTALL_PROPRIETARY=FALSE -DFMOD=FALSE ../indra
      

      (note the missing -DGLH_INCLUDE_DIR=$(pwd)/build-linux-i686/packages/include)
      and

      autobuild --verbose --dry-run build --no-configure -c OpenSourceStandAloneRelWithDebInfo -- -j1
      

      gives just

      executing build command make -j 12
      

      (The -j 12 is from the configuration. The -j1 from the command line is missing.)

      Removing the --dry-run reveals that although not displayed by --verbose, the passed through options do have their intended effect. (E.g. with -j1, only one core will get used.)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              boroondas.gupte Boroondas Gupte
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: