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) |
83 | 83 | OUTPUT_STRIP_TRAILING_WHITESPACE |
84 | 84 | ) |
85 | 85 | STRING(REPLACE "\n" ";" SW_VERS_OUTPUT_LIST "${SW_VERS_OUTPUT}") |
| 86 | MESSAGE(STATUS "SW_VERS_OUTPUT_LIST: '${SW_VERS_OUTPUT_LIST}'") |
86 | 87 | LIST(GET SW_VERS_OUTPUT_LIST 0 SW_VERS_PRODUCTNAME) |
87 | 88 | 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}'") |
88 | 91 | |
89 | 92 | STRING(REGEX MATCH |
90 | 93 | "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() |
91 | 106 | IF(NOT CMAKE_MATCH_1 OR NOT CMAKE_MATCH_2) |
92 | 107 | MESSAGE(FATAL_ERROR "Could not run sw_vers") |
93 | 108 | ENDIF() |