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

qmake2cmake fails to parse project

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.6
    • Build tools: Other
    • None
    • Windows 10

    Description

      I can't use this tool. It returns a error. Its output:

       

      Microsoft Windows [Version 10.0.19045.3693]
      (c) Microsoft Corporation. All rights reserved.
      
      C:\3.bak>qmake2cmake --min-qt-version 6.6 fdm.pro
      Parsing "fdm.pro"...
      Analyzing "ui/ui.pro"...
      fdm_translations {
      ^
      Expected end of text, found 'fdm'  (at char 346), (line:15, col:1)
      Traceback (most recent call last):
        File "c:\users\user\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
          return _run_code(code, main_globals, None,
        File "c:\users\user\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
          exec(code, run_globals)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38\Scripts\qmake2cmake.exe\__main__.py", line 7, in <module>
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\pro2cmake.py", line 5156, in main
          generate_new_cmakelists(
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\pro2cmake.py", line 4951, in generate_new_cmakelists
          cmakeify_scope(
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\pro2cmake.py", line 4929, in cmakeify_scope
          handle_subdir(
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\pro2cmake.py", line 2004, in handle_subdir
          handle_subdir_helper(scope, io_string, indent=indent, current_conditions=current_conditions)
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\pro2cmake.py", line 1868, in handle_subdir_helper
          extend_library_dependencies(sd, scope.file_absolute_path)
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\pro2cmake.py", line 1825, in extend_library_dependencies
          parse_result, project_file_content = parseProFileContents(file_contents)
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\qmake_parser.py", line 429, in parseProFileContents
          return parser.parseFileContents(contents)
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\qmake_parser.py", line 411, in parseFileContents
          raise pe
        File "D:\Work\Source\15\qmake2cmake\src\qmake2cmake\qmake_parser.py", line 406, in parseFileContents
          result = self._Grammar.parseString(contents, parseAll=True)
        File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\pyparsing\util.py", line 256, in _inner
          return fn(self, *args, **kwargs)
        File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\pyparsing\core.py", line 1200, in parse_string
          raise exc.with_traceback(None)
      pyparsing.exceptions.ParseException: Expected end of text, found 'fdm'  (at char 346), (line:15, col:1)C:\3.bak>

      I cut as much as possible from my project's files and attached a minimal reproducible sample.

      I've also tried to use qmake2cmake_all but it says it can't find SUBDIRS project despite the fact that I've specified it using --main-file option.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            alervd Alexander Dyagilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes