Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1838

Add ability to set probes properties from command line

    XMLWordPrintable

Details

    • All

    Description

      Hi!

      I have a custom Conanfile probe that call `conan install`. This probe has  property `offline` and its default value is false. If it's set to false this probe call conan with `-update` flag, otherwise with `-no-remote` flag:

       

      // RtConanfileProbe.qbs
      Probe {
          ...
          property bool offline: false
          property stringList _args: {
              ...
              if (!project.offline)
                  res.push("--update");
              else
                  res.push("--no-remote");
          }
      ...
      }
      
      // myproject.qbs
      Project {
          RtConanfileProbe {
              id: conan
          }
      
          readonly property var conanDependencies: conan.dependencies
      ...
      }

       

       

      When I need to build my project, when I'm offline i need to set it to true, and I want to do it using command line. Something like:

       

      qbs profile:glibc-arm64-gcc11 project.conan.offline:true
      qbs profile:glibc-arm64-gcc11 RtConanfileProbe.offline:true
      qbs profile:glibc-arm64-gcc11 probes.RtConanfileProbe.offline:true

       

       

      Is there any way how to do it or may be something similar to it? I only found that I could create the same property in project and pass to probe, but I want to do it easier

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            lo1ol Petr Mikhalitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes