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

qt5_generate_repc() outputtype string compare fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.4
    • Fix Version/s: None
    • Component/s: Remote Objects
    • Labels:
      None
    • Environment:
      Windows, CMake Version 3.14.5

      Description

      In order to generate rep_MyObject_source.h header file I call the qt5_generate_repc() macro like this:

      qt5_generate_repc(MYSRCS MyObject.rep SOURCE)

      But the macro always generates replica header files because in Qt5RemoteObjectsMacros.cmake the Line 64 does never evaluate to true

      if(${outputtype} STREQUAL "SOURCE")

      To reproduce the problem i set up a small script. I couldn't find any value for REPC_TYPE which makes the last if() evaluate to true.

      set(REPC_TYPE "SOURCE")
      if("${REPC_TYPE}" STREQUAL "SOURCE")
          message("this works")
      endif()
      if(${REPC_TYPE} STREQUAL SOURCE)
          message("this works too")
      endif()
      if(REPC_TYPE STREQUAL "SOURCE")
          message("and this works too")
      endif()
      if(${REPC_TYPE} STREQUAL "SOURCE")
          message("but this, nooo, never")
      endif()
      

      Resetting CMakeCache and rerunning cmake did not solve the problem.

        Attachments

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

          Activity

            People

            Assignee:
            bstottle Brett Stottlemyer
            Reporter:
            gravity Nicolas Marty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes