Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102708

lupdate warns about Unterminated C++ string while parsing CMakeLists.txt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.3.0
    • Tools: Linguist
    • None
    • All

    Description

      C/C++ compiler definitions including double-quotes in CMake project files, makesĀ lupdate generating unwanted messages.

      How to reproduce:

      • Use a Qt CMake project
      • add to CMakeLists.txt a line like add_compile_definitions(PRJ_NAME_DEF=\"${PROJECT_NAME}\")
      • Execute lupdate on the project from Qt Creator (Tools -> External -> Linguist -> Update Translations (lupdate)

      In the output of lupdate you will get something like:
      .../CMakeLists.txt: Unterminated C++ string
      .../CMakeLists.txt: Unbalanced opening parenthesis in C++ code (or abuse of the C++ preprocessor)
      (N.B.: complete paths and CMakeLists.txt line numbers have been omitted here)

      I do not found any other way to include double-quotes in the argument of add_compile_definitions().

      Furthermore, I suppose this is a bug since lupdate should not parse CMakeLists.txt as C++ code.

      Attachments

        Issue Links

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

          Activity

            People

              lugerard Lucie Gerard
              flinco Lorenzo Buzzi
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes