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

qt6_add_repc_sources produces an error if a genex is used for preprocessor macros

    XMLWordPrintable

Details

    • bc0c44d4cd634c574307920968f0ab1bf6cd8305, e4c396f25 (6.6)

    Description

      To reproduce, open time server example and add this to the CMakeLists.txt file:

      add_compile_definitions($<CONFIG>)
      

      This results in an error like this:

      /home/user/Qt/Examples/Qt-6.6.1/remoteobjects/remoteobjects_server/CMakeLists.txt:39: error: Error evaluating generator expression:
      
        $<CONFIG$<ANGLE-R>;-o;/home/user/Qt/Examples/Qt-6.6.1/remoteobjects/build-remoteobjects_server-Desktop_Qt_6_6_1_GCC_64bit-Debug/moc_rep_timemodel_source.cpp;/home/user/Qt/Examples/Qt-6.6.1/remoteobjects/build-remoteobjects_server-Desktop_Qt_6_6_1_GCC_64bit-Debug/rep_timemodel_source.h>
      
      Expression did not evaluate to a known generator expression
      
      Call stack:
        /home/user/Qt/Examples/Qt-6.6.1/remoteobjects/remoteobjects_server/CMakeLists.txt:39 (qt6_add_repc_sources)
        /home/user/Qt/6.6.1/gcc_64/lib/cmake/Qt6RemoteObjects/Qt6RemoteObjectsMacros.cmake:93 (_qt_internal_add_repc_files)
        /home/user/Qt/6.6.1/gcc_64/lib/cmake/Qt6RemoteObjects/Qt6RemoteObjectsMacros.cmake:81 (qt6_wrap_cpp)
        /home/user/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:199 (_qt_internal_create_moc_command)
        /home/user/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:112 (file)
      

      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
            poikelin Joni Poikelin
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes