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

qt5_generate_repc() outputtype string compare fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.4
    • Remote Objects
    • None
    • 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

            bstottle Brett Stottlemyer
            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