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

Module declaration in product file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 1.1.0
    • None
    • Linux 64 Bit
    • c6b93561618776bc247483e55db98df590ec0c8d

    Description

      The definition of an empty module with only a name property is not supportet in the same product file.
      I have tried to put the module definition in and outside of a product.
      Also to put the module definition into a project definition makes no difference.
      The original idea was to move the working rule of the product in the module definition

      import qbs
      import qbs.File
      import qbs.FileInfo
      
      
      Product {
          type: "application"
          files: "main.cpp"
      
          FileTagger {
              pattern: "*.cpp"
              fileTags: ["cpp"]
          }
      
          Rule {
              id: compiler
              inputs: ['cpp']
              auxiliaryInputs: ['hpp']
              condition: true
              explicitlyDependsOn:  ['cpp']
      
              Artifact {
                  fileTags: ["cppcopy","application"]
                  fileName: input.completeBaseName+".cpp"
              }
      
              prepare: {
                  var cmd = new JavaScriptCommand();
                  cmd.description = "Copy Example File: '" 
                                    + input.fileName + "'";
                  cmd.highlight = "codegen";
                  cmd.sourceCode = function() {
                      var sourcepath = input.fileName;
                      File.copy( sourcepath , output.fileName);
                  }
                  return cmd;
              }
          }
      
          Module {
              name: "testmodule"
              property string warningLevel
          }
      }
      

      It produces the following error:

      ERROR: language/projectresolver.cpp:1005 ASSERT: f
      

      Attachments

        For Gerrit Dashboard: QBS-507
        # Subject Branch Project Status CR V

        Activity

          People

            kandeler Christian Kandeler
            losty Thomas B.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes