Ticket #63726: more_sw_vers_debug.diff

File more_sw_vers_debug.diff, 1.6 KB (added by chrstphrchvz (Christopher Chavez), 3 years ago)

Another patch to debug sw_vers command output

  • cmake/package_name.cmake

    From f9af863dabd5a416ba41fc86f196206ea43025d2 Mon Sep 17 00:00:00 2001
    From: Christopher Chavez <chrischavez@gmx.us>
    Date: Thu, 4 Nov 2021 15:31:01 -0500
    Subject: [PATCH] print debugging output from sw_vers
    
    ---
     cmake/package_name.cmake | 15 +++++++++++++++
     1 file changed, 15 insertions(+)
    
    diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake
    index 058b0bcbd8cb..0be8ac0956b1 100644
    a b MACRO(GET_PACKAGE_FILE_NAME Var) 
    8383        OUTPUT_STRIP_TRAILING_WHITESPACE
    8484        )
    8585      STRING(REPLACE "\n" ";" SW_VERS_OUTPUT_LIST "${SW_VERS_OUTPUT}")
     86      MESSAGE(STATUS "SW_VERS_OUTPUT_LIST: '${SW_VERS_OUTPUT_LIST}'")
    8687      LIST(GET SW_VERS_OUTPUT_LIST 0 SW_VERS_PRODUCTNAME)
    8788      LIST(GET SW_VERS_OUTPUT_LIST 1 SW_VERS_PRODUCTVERSION)
     89      MESSAGE(STATUS "SW_VERS_PRODUCTNAME: '${SW_VERS_PRODUCTNAME}'")
     90      MESSAGE(STATUS "SW_VERS_PRODUCTVERSION: '${SW_VERS_PRODUCTVERSION}'")
    8891
    8992      STRING(REGEX MATCH
    9093        "ProductVersion:[\n\t ]*([0-9]+)\\.([0-9]+)" UNUSED ${SW_VERS_PRODUCTVERSION})
     94      MESSAGE(STATUS "CMAKE_MATCH_1: '${CMAKE_MATCH_1}'")
     95      MESSAGE(STATUS "CMAKE_MATCH_2: '${CMAKE_MATCH_2}'")
     96      IF(${CMAKE_MATCH_1})
     97        MESSAGE(STATUS "CMAKE_MATCH_1: TRUE")
     98      ELSE()
     99        MESSAGE(STATUS "CMAKE_MATCH_1: FALSE")
     100      ENDIF()
     101      IF(${CMAKE_MATCH_2})
     102        MESSAGE(STATUS "CMAKE_MATCH_2: TRUE")
     103      ELSE()
     104        MESSAGE(STATUS "CMAKE_MATCH_2: FALSE")
     105      ENDIF()
    91106      IF(NOT CMAKE_MATCH_1 OR NOT CMAKE_MATCH_2)
    92107        MESSAGE(FATAL_ERROR "Could not run sw_vers")
    93108      ENDIF()