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

add_custom_command() POST_BUILD does not create dependencies and have no option to modify parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.10.0
    • Build System: CMake
    • None
    • All

      I am trying to generate postscript for crashlytics upload.

      basicaly what should be the outcome is this:

      however, the DEPENDS to add values to "Input Files" does not seem working,

      according to this, it should be done via:
       

      set(DWARF_DSYM_FOLDER_PATH "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}")
      set(DWARF_DSYM_FILE "${DWARF_DSYM_FOLDER_PATH}/Contents/Resources/DWARF/${PRODUCT_NAME}")
      set(INFO_PLIST "${DWARF_DSYM_FOLDER_PATH}/Contents/Info.plist") set(GOOGLE_SERVICE_INFO_PLIST "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist")
      set(EXECUTABLE_PATH "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)")
      
      add_custom_command(POST_BUILD
          TARGET ${TARGET_NAME}
          COMMAND /bin/sh -c "${CMAKE_CURRENT_SOURCE_DIR}/../../extralibs/firebase_ios_sdk/FirebaseCrashlytics/run"
          COMMENT "iOS: Processing and uploading dSYM files to Crashlytics"
          DEPENDS ${DWARF_DSYM_FOLDER_PATH} ${DWARF_DSYM_FILE} ${INFO_PLIST} ${GOOGLE_SERVICE_INFO_PLIST} ${EXECUTABLE_PATH}
      )

       
      but it does not populate the Input Files whatsoever,
      also it very much manipulates with the COMMAND i put there:

      and for sure it does not give me options to manipulate with other fields from that POST_SCRIPT build phase:

       
      therefore currently the only option i see is to wait till project.pbxproj exists and manipulate it manualy via some shell file... which I do but its shady solution and brings even more pain then gain (it reformates, change codings etc, so many things to consider... and each xcode version changes stuff).
       
      so isnt there ANY way how to physicaly set/change properties in the that post script block generated from add_custom_command() into project.pbcproj?
      currently (for this firebase case) there are properties in that block to be set/modified:
       - shellScript (this is whats being populated from COMMAND
       - alwaysOutOfDate
       - name (default being set as "CMake PostBuild Rules")
       - showEnvVarsInLog
       - inputFiles (which in theory shall be populated by DEPENDS but does not work)
       

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

            qtbuildsystem Qt Build System Team
            shokarta Jiri Zaloudek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes